[ 
https://issues.apache.org/jira/browse/ATLAS-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14705452#comment-14705452
 ] 

Jonathan Maron edited comment on ATLAS-118 at 8/20/15 6:08 PM:
---------------------------------------------------------------

I disagree.  Relying on default behavior makes configuration mismatches much 
more of an issue - if multiple projects rely on the default behavior, exactly 
which file will get loaded?  The one that's first in the classpath for the 
given classloader, which is subject to change and yields difficulties in 
debugging when an issue suddenly manifests with no code change.  In addition, 
this is not a code change.  Rather, it is the suggested mechanism from the 
log4j manual - use the "log4.configuration" system property to identity the 
file name to leverage.  So all we've really done is ensure that we are reading 
the configuration we expect and preventing others from loading a configuration 
they do not expect by being explicit with a file name (added the property to 
the appropriate scripts).


was (Author: jmaron):
I disagree.  Relying on default behavior makes configuration mismatches much 
more of an issue - if multiple projects rely on the default behavior, exactly 
which file will get loaded?  The one that's first in the classpath for the 
given classloader, which is subject to change and yields difficulties in 
debugging when an issue suddenly manifests with no code change.  In addition, 
this is not a code change.  Rather, it is the advised mechanism from the log4j 
manual - use the "log4.configuration" system property to identity the file name 
to leverage.  So all we've really done is ensure that we are reading the 
configuration we expect and preventing others from loading a configuration they 
do not expect by being explicit with a file name (added the property to the 
appropriate scripts).

> rename atlas log4j configuration files to avoid config collisions with other 
> projects
> -------------------------------------------------------------------------------------
>
>                 Key: ATLAS-118
>                 URL: https://issues.apache.org/jira/browse/ATLAS-118
>             Project: Atlas
>          Issue Type: Bug
>    Affects Versions: 0.6-incubating
>            Reporter: Jonathan Maron
>            Assignee: Jonathan Maron
>             Fix For: 0.6-incubating
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> There appear to be instances in which using the default name for log4j 
> configuration (e.g. log4j.xml) will cause the atlas version of the file to be 
> picked up and utilized by other projects (e.g. hive/hcat).  This can actually 
> lead to issues with the functionality of other projects, especially if they 
> are dependent on log parsing.  
> The log4j.xml file will be renamed to atlas-log4j.xml and explicitly 
> referenced from the scripts via the 'log4j.configuration' system property.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to