the way application logging (e.g. tomcat logging) in DHIS 2 worked up to now has not been ideal. Basically all log output has been sent to std out. For the tomcat container this means all logging has ended up in catalina.out under tomcat install dir > logs.
This is not great since there is no simple way (beside using logrotate or other tools) to control the size of the log file or to specify custom locations for DHIS 2-related log content. This could cause a server to uncontrollably run out of disk space.
In DHIS 2.19 this has changed so that DHIS 2-related log output is sent to the DHIS2_HOME location /logs (this is where you e.g. keep the hibernate.properties file, set by an env variable). The system also separates log output for the main background processes such as analytics table generation and import-export into separate files, so that you can easily look up errors/output for these without having to skim through lots of other content. So we now have 4 log files:
You can read more in the docs here:
The system currently still logs to std out, as we wanted to introduce this gradually and not cause confusion.
In 2.20 we plan to stop logging to std out (catalina.out) completely, and only use the log files under DHIS2_HOME.
I am interested to hear if people are comfortable with this and if it sounds like a good solution.