dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #07364
Re: [Dhis2-devs] logging (for server administrators)
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 <bobjolliffe@xxxxxxxxx> 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 <halvdanhg@xxxxxxxxx> 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 <mortenoh@xxxxxxxxx>:
>>>
>>>
>>> On Sun, Jun 7, 2015 at 10:37 PM, Lars Helge Øverland <larshelge@xxxxxxxxx>
>>> 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@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help : https://help.launchpad.net/ListHelp
>>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help : https://help.launchpad.net/ListHelp
>>
Follow ups
References