Hi Lars

The metadata versioning and sync is an optional feature. It totally depends
on the deployment strategy that we want to adopt and given that whether we
choose to do metadata sync or not.

For these reasons adding the metadata sync log as a first class citizen to
the Log4JLogConfigInitializer does not sound like a good idea.

Let me know your thoughts?

Regards
Vanya

On Wed, Jun 15, 2016 at 12:41 PM, Lars Helge Øverland <l...@dhis2.org>
wrote:

> Hi there,
>
> okay. It would be great if we do not introduce another way of doing
> logging. The problem is that resolving the DHIS2_HOME directory is a bit
> complex - the system looks for the system property dhis2.home, the env
> variable DHIS2_HOME, then falls back to opt/dhis2. log4j 1 does not support
> this type of custom logic directly. Perhaps log4j 2 does it, not exactly
> sure, but the upgrade path is a bit tricky.
>
>
>
> Could you instead add a new logger in Log4JLogConfigInitializer for
> metadata sync? I.e.:
>
> <DHIS2_HOME>/logs/dhis-metadata-sync.log
>
> If you need to set a custom location for your log4j properties for testing
> purposes you can already set a custom log4j.properties location, see docs
> here:
>
> http://dhis2.github.io/dhis2-docs/master/en/implementer/html/ch08s08.html
>
>
> regards,
>
> Lars
>
>
>
>
> On Wed, Jun 15, 2016 at 8:13 AM, Aamer Mohammed <aam...@thoughtworks.com>
> wrote:
>
>> Hi Lars,
>>
>> We are using log4j.properties file instead of 'Log4JLogConfigInitializer'
>> for metadata sync logging purpose. The FILE parameter of FileAppender in
>> log4j.properties needs the value of DHIS2_HOME environment variable to save
>> the metadata sync log in the same folder location as that of the other
>> logs. We are creating a system property specified in VM options when
>> starting the DHIS server to get the value of environment variable and
>> log4j.properties file can use that property.
>>
>> We would be mentioning this in the documentation as well. Would like to
>> hear your thoughts regarding this.
>>
>> Thanks
>> Aamer.
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> l...@dhis2.org
> http://www.dhis2.org <https://www.dhis2.org/>
>
>


-- 
With Regards
ThoughtWorks Technologies
Hyderabad

--Stay Hungry Stay Foolish!!
_______________________________________________
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