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

Ralph Goers commented on LOG4J2-1050:
-------------------------------------

Well, At first I wasn't sure ClassLoaderContextSelector would always set the 
LoggerContext in the ThreadLocal, but it appears it does. However, it looks 
like JndiContextSelector may not set it, but I seem to recall that that is 
supposed to be used with a servlet filter that would do the trick.  So with the 
"standard" ContextSelectors it should be fine. But if a user writes their own 
ContextSelector there is no guarantee the ThreadLocal will contain anything.  
At the very least I would check for a null value being returned and return null 
if it is.

> Write log files relative to log4j2.xml
> --------------------------------------
>
>                 Key: LOG4J2-1050
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1050
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Configurators
>    Affects Versions: 2.3
>         Environment: All
>            Reporter: adam Retter
>            Priority: Minor
>         Attachments: 
> 0001-feature-Added-support-for-properties-interpolation-o.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> I attach a patch related to this mailing list post - 
> http://mail-archives.apache.org/mod_mbox/logging-log4j-user/201506.mbox/%3CCAPK0icj%3DY3T9ptBGyGdgbHyMow_YWcfwC6UdLHS-QbgnBk8wkA%40mail.gmail.com%3E
> The patch makes the properties `log4j:configLocation` and 
> `log4j:configParentLocation` available for substitution in the log4j 
> configuration file.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to