Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-3064

Add support for "conditional" plugins

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.14.1
    • 2.15.0
    • Configuration, Plugins
    • None

    Description

      Spring has implemented a <SpringProfile> element for Logback which allows a section of configuration to be included if the specified profile(s) are active. They have asked that Log4j be able to provide similar functionality. This could be done by implementing support for "conditional" plugins, the specific SpringProfile plugin, or both. 

      My suggestion would be to implement the support for conditional plugins and then possibly a ScriptConditional in Log4j-core. Then I would add the SpringProfile support in log4j-spring-boot.

      It might be useful to also allow the conditional to include the configuration it wraps from another location instead of requiring it to be in the current file. 

      Attachments

        Activity

          People

            Unassigned Unassigned
            rgoers Ralph Goers
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: