Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.14.1
-
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.