You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "thejas-stripe (via GitHub)" <gi...@apache.org> on 2023/11/22 20:54:18 UTC

[I] Custom ConfigurationFactory implementation added to the classpath are not loaded (logging-log4j2)

thejas-stripe opened a new issue, #1997:
URL: https://github.com/apache/logging-log4j2/issues/1997

   ## Description
   The document [here](https://logging.apache.org/log4j/log4j-2.12.4/manual/customconfig.html) under `Understanding ConfigurationFactory` says 
   
   ```
   3. A ConfigurationFactory implementation can be added to the classpath 
   and configured as a plugin in the "ConfigurationFactory" category. 
   The Order annotation can be used to specify the relative priority 
   when multiple applicable ConfigurationFactories are found.
   ```
   
   This is not true. We need to explicitly specify the packages to look for  using 
   
   `PluginManager.addPackage("com.abc.xyl");` during start up before log4j initialization. 
   
   This is not documented anywhere. 
   
   
   ## Configuration
   
   **Version:** [2.22.0]
   
   **Operating system:** [ALL]
   
   **JDK:** [ALL]
   
   
   ## Reproduction
   https://github.com/eugenp/tutorials/blob/master/logging-modules/log4j2/src/test/java/com/baeldung/logging/log4j2/xmlconfiguration/XMLConfigLogIntegrationTest.java#L24 
   
   [An isolated test reproducing the test.
   JUnit tests similar to the ones in the code base are extremely appreciated.]
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Custom ConfigurationFactory implementation added to the classpath are not loaded (logging-log4j2)

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz closed issue #1997: Custom ConfigurationFactory implementation added to the classpath are not loaded
URL: https://github.com/apache/logging-log4j2/issues/1997


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Custom ConfigurationFactory implementation added to the classpath are not loaded (logging-log4j2)

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on issue #1997:
URL: https://github.com/apache/logging-log4j2/issues/1997#issuecomment-1823542666

   @thejas-stripe,
   
   In order to be automatically detected, plugins must be compiled with the annotation processor present in `log4j-core`. In your project you explicitly pass `-proc:none` to your compiler's options. Remove that line and your example should work.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org