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

Romain Manni-Bucau edited comment on LOG4J2-788 at 8/21/14 10:00 AM:
---------------------------------------------------------------------

Sorry for this not that sexy patch but no access to svn/git ATM

edit: idea of the patch is:
1) if no config is provided try to get its uri eagerly and force it - not sure 
it is ok to suppose factory.getConfiguration(source) will not return null
2) if multiple resources match the resource then remove parents one and 
consider only children if it exists (Loader)
3) technical detail: for configsource backed by a file ensure url is still 
filled

I'll attach the test files since the diff ignored it



was (Author: romain.manni-bucau):
Sorry for this not that sexy patch but no access to svn/git ATM



> Make Log4j2 EAR friendly
> ------------------------
>
>                 Key: LOG4J2-788
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-788
>             Project: Log4j 2
>          Issue Type: Task
>            Reporter: Romain Manni-Bucau
>         Attachments: log4j2-788.patch
>
>
> ClassLoaderContextSelector seems a good candidate for ears but has a little 
> issue in org.apache.logging.log4j.core.util.Loader#getResource since it 
> doesn't handle overriding by classloader. The idea would be to use 
> getResources instead of getResource and if multiple URLs are found remove 
> urls from parent classloaders. If some urls remains then returns the first 
> one and log it is ambiguous (warning), if not apply same logic on original 
> URL enum.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to