System administrators can configure Mifos to log appropriate information about what the application is doing. Mifos uses the Apache Log4J 1.2 logging system. Log4J allows us to increase or decrease the information that is logged by setting the log level (INFO, WARN, DEBUG, FATAL, etc.) we are interested in. Only messages at this level of severity or higher will be logged.
The logger configuration is done using the loggerconfiguration.xml file.
mifos/src/main/resources/org/mifos/config/resources/loggerconfiguration.xml
org/mifos/framework/util/resources/loggerresources/loggerconfiguration.xml
. If you are using Tomcat, the directory would be $CATALINA_HOME/lib/org/mifos/framework/util/resources/loggerresources/
(parent directories must be created).To set a log level for a particular component, you can configure a category by adding XML that looks like this (if it exists, just change the existing XML):
<category name="org.mifos.application.collectionsheet"> <priority value="INFO"/> </category> |
To log every JSP hit (only available in v1.3 and later), add:
<category name="org.mifos.framework.struts"> <priority value="INFO"/> </category> |
You might see lots of noise for warning messages from org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog, to suppress these warnings use
<category name="org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog" additivity="true"> <priority value="ERROR"/> </category> |
An explanation of this behavior is given here: https://forum.hibernate.org/viewtopic.php?p=2404391
Add these to your external loggerconfiguration.xml (by default these logs are enabled) to be able to see information logs related to application initialization, configuration, and database upgrade
<category name="org.mifos.framework.ApplicationInitializer"> <priority value="INFO"/> </category> <category name="org.mifos.framework.util.ConfigurationLocator"> <priority value="INFO"/> </category> <category name="org.mifos.framework.persistence.DatabaseMigrator"> <priority value="INFO"/> </category> |