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 2022/01/17 20:40:00 UTC

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

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

Matt Sicker commented on LOG4J2-3300:
-------------------------------------

This is partially implemented in master so far (at least the annotations are implemented).

> 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
>            Priority: Major
>
> 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)