Maybe a better approach would be to upgrade log4j 1.2.7 to log4j 2 -
which allows for example to refer to envronment variables (like
DHIS2_HOME) in the configuration.

On 8 June 2015 at 13:37, Bob Jolliffe <bobjolli...@gmail.com> wrote:
> Ah!! I have just noticed that this new logging regime is actually
> hardcoded in java.  That strikes me as a really bad idea.  Can we not
> achieve exactly the same effect as you get in code by providing a
> default log4j.xml file bundled in the war which could be overriden by
> an external file.
>
> Whereas having a sensible out-of-the-box logging setup makes sense, I
> can't really see any benefit at all in doing this with code rather
> than configuration.  What I would rather do, for example, is to have a
> log4j config file bundled with dhis2-tools which is maybe a copy of
> the default config.  Then implementers could tweak if they saw fit.
> Similar with devs or docker folk who might want to fall back to
> catalina.out.
>
> What is the reason for configuring the logging with compiled code?  Is
> it just to to specify the default logging location based on
> DHIS2_HOME?
>
> On 8 June 2015 at 13:06, Halvdan Grelland <halvda...@gmail.com> wrote:
>> If the log4j config is overridable at launch we could always add a property
>> pointing to a development config in the maven dev profile. I'm not sure how
>> that would play with this though as it's being configured programmatically
>> at application startup.
>>
>> Thoughts Lars?
>>
>> 2015-06-08 3:45 GMT+02:00 Morten Olav Hansen <morte...@gmail.com>:
>>>
>>>
>>> On Sun, Jun 7, 2015 at 10:37 PM, Lars Helge Øverland <larshe...@gmail.com>
>>> wrote:
>>>>
>>>> No everything generated by DHIS 2 including exceptions go into the main
>>>> dhis.log file. We should of course aim at fixing the cause of these errors.
>>>
>>>
>>> Is there an easy way to switch this off during development? Having to tail
>>> an extra log file every time doesn't sounds very convenient..
>>>
>>> --
>>> Morten
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to     : dhis2-devs@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to