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.
- For versions 1.3 or later, this file can be placed in the .mifos directory - see MifosConfigurationLocations for more information. Make a copy of the existing loggerconfiguration.xml from
- For versions 1.2 and before, this file must be placed on the application server classpath at
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):
To log every JSP hit (only available in v1.3 and later), add:
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">
An explanation of this behavior is given here: https://forum.hibernate.org/viewtopic.php?p=2404391
Logging in the 2.1.x Releases
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
Logging in the 1.2.x Releases
- For versions after 1.2.2, logging org.mifos.application.bulkentry component is set to INFO. This means the application will log detailed information about page views and which records are being saved to the database for the Collection Sheet Entry system. You can override this logging by setting the the priority to a higher level, like WARN.