[ https://issues.apache.org/jira/browse/LOG4J2-1686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15662885#comment-15662885 ]
Raman Gupta commented on LOG4J2-1686: ------------------------------------- No, I'm not talking about selecting loggers at the time of an event at all, and I'm not sure why you would have assumed that I was (I think this is just another indicator that scripts are a confusing way to address this class of problems, because their scope is not clear without an understanding of the implementation). A conditional mechanism would simply control what which elements are created during logging configuration. Note that my example of using a script whose result are keys to select config elements was just one possible implementation. For loggers, my use case is that in development I might want to have one set of loggers at various levels, and in production I might want to define a totally different set of loggers at various levels. > I'm also not sure what it means to have a "keyScript" attribute on the > Appenders. The Appenders would be create with a script attached to them that > does what exactly? It would do exactly what AppenderSelector does (which I didn't know existed, thanks for pointing it out): only the Appenders whose "key" matched the output of the script given by keyScript would be created, the others are ignored. The only difference is that the syntax would be consistent across all log4j config elements so it only has to be documented and understood once. > Support conditional configuration > --------------------------------- > > Key: LOG4J2-1686 > URL: https://issues.apache.org/jira/browse/LOG4J2-1686 > Project: Log4j 2 > Issue Type: New Feature > Components: Configurators > Affects Versions: 2.7 > Reporter: Raman Gupta > Priority: Blocker > > It would be great to support conditional configuration like logback: > http://logback.qos.ch/manual/configuration.html#conditional > This allows for more advanced configuration than is currently possible with > property substitution. > Example use case: to implement > https://issues.apache.org/jira/browse/LOG4J2-1685 without log4j library > support. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org