Deploying the Mifos Transaction Monitor
Note: as of "Shamim D" release (version number and date not currently available) the MifosLogFilter is included with the Mifos application. This means only steps 3 (server.xml changes) and 4 (restart Tomcat) are required to deploy this specific Mifos transaction monitoring.
- Put MifosLogFilter jar into the 'tomcat' lib directory. This is the servlet filter that creates the request attribute 'mifos-txnname' which is picked up in the AccessLogValve configuration.
- In the 'tomcat' conf directory, edit web.xml. There should be a 'Built In Filter Definitions' section - add the following to it:
<filter> <display-name>MifosLogFilter</display-name> <filter-name>MifosLogFilter</filter-name> <filter-class>org.mifos.servlet.filters.MifosLogFilter</filter-class> </filter>
Just below this there should be a 'Built In Filter Mappings' section - add the following to it:
<filter-mapping> <filter-name>MifosLogFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
Then save web.xml.
- In the 'tomcat' conf directory, edit server.xml - near the very bottom you'll find the reference to AccessLogValve - replace that reference with the following and save:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="access." suffix=".log" pattern="%t, %s, %{mifos-txnname}r, %D, %B" resolveHosts="false"/>
Note: make sure the valve is not commented out (i.e. no surrounding <!- ->)
- After Tomcat is restarted, transactions will be logged to CATALINA_HOME/logs/access.YYYY-MM-DD.log