You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Axieum (Jira)" <ji...@apache.org> on 2020/04/26 11:08:00 UTC

[jira] [Created] (LOG4J2-2830) How to merge an additional `log4j.xml` file post-initialisation?

Axieum created LOG4J2-2830:
------------------------------

             Summary: 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


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)