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

Ralph Goers commented on LOG4J2-2830:
-------------------------------------

I apologize for not responding quicker to this. If you have already found the 
answer to what you are looking for please let us know.

 

I am having a hard time understanding how your add-on relates to Log4j. Why 
does it need to be loaded before Log4j? If you need something to load with 
Log4j then you should create some sort of Plugin that Log4j will load.  Other 
than that I am not really sure what you are attempting to do.

> How to merge an additional `log4j.xml` file post-initialisation?
> ----------------------------------------------------------------
>
>                 Key: LOG4J2-2830
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2830
>             Project: Log4j 2
>          Issue Type: Question
>          Components: API, Configuration, Configurators
>    Affects Versions: 2.13.2
>         Environment: * Java 1.8
>  * Log4j2 2.13.2
>  * Gradle 6.3
>  
>  * Project under question: 
> [https://github.com/Axieum/Chatter/blob/dev/discord/chatter-discord/src/main/resources/log4j.xml]
>            Reporter: Axieum
>            Priority: Major
>              Labels: newbie
>
> I am creating an add-on for a framework which, by the time my add-on begins 
> to load, has already established and loaded its own `log4j.xml` file. I would 
> like to have my `log4j.xml` file merged and loaded.
>  
> I am able to manually achieve this by, in development, modifying the run 
> configuration to include my `log4j.xml` path in the 
> `-log4j.configurationFile=their_file.xml,my_file.xml`. But this is not a 
> solution.
>  
> I cannot find a way to have my add-on run some static code before the 
> framework.
> Is it possible for the framework to remove their hardcoded configuration 
> path, and allow Log4j2 to automatically search and find all `log4j.xml` files 
> on the class path?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to