dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #37822
Re: logging (for server administrators)
Hi Bob,
thanks for the feedback.
Yes the main reason for having a java based default config is to be able to
set the log file path to the dhis home directory. Yes the env var support
in log4j 2 is cool but it is not sufficient in our use case since dhis
config loading is more complex - it looks for 1) a system property
dhis2.home, 2) an env variable DHIS2_HOME and 3) eventually falls back to
using <user-home-dir>/opt/dhis2. I know DHIS 2 Live uses 2) and I know many
deployments which use 3). So there is no guarantee that DHIS2_HOME is set,
hence it is not a reliable solution.
Re XML vs config files - config files are more flexible in general but in
this scenario it makes no difference. In any case you don't want to modify
or remove config files which are bundled inside the WAR file since those
changes will be wiped next time the WAR is upgraded, but rather append /
override it with an external file. You can have your external file override
the default DHIS 2 config, irrespective of that default config being set in
Java or from a config file.
regards,
Lars
Follow ups
References