You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Matt Sicker (Jira)" <ji...@apache.org> on 2021/12/29 18:30:00 UTC

[jira] [Created] (LOG4J2-3300) Add annotations for specifying conditional plugins

Matt Sicker created LOG4J2-3300:
-----------------------------------

             Summary: Add annotations for specifying conditional plugins
                 Key: LOG4J2-3300
                 URL: https://issues.apache.org/jira/browse/LOG4J2-3300
             Project: Log4j 2
          Issue Type: New Feature
          Components: Plugins
            Reporter: Matt Sicker


Inspired by how Spring Boot's auto configuration system works using its ConditionalOnXYZ annotations, it would be great to support some similar annotations for specifying when a plugin may be allowed to be loaded. For example, we could have annotations for requiring presence of a particular class (like JndiManager for JNDI-related plugins), requiring a PropertiesUtil setting is set (as in LOG4J2-3299), etc.

This will help transition 2.x to 3.x where a lot of optional functionality will be split into their own modules. For 2.x, the best option here would be to make certain features opt-in rather than automatic based on the classpath.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)