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

Ralph Goers commented on LOG4J2-1686:
-------------------------------------

Yes, I can some value in that as you might want to configure loggers to trace 
certain components in dev that you don't need in production. But most of the 
time this is unnecessary as you can define the loggers in both environments but 
just change their logging level depending on the environment. Likewise, you 
might want to log to a central log aggregation site in production but to local 
files in dev. Again, that is more likely to be handled by using different 
Appenders. So if we didn't have LoggerSelectors I doubt they would be missed, 
so long as all the other Selectors are there.

What you are pointing out is that we need a properties selector where I can do 
something like:

      <ScriptPropertiesSelector ref="PropertiesSelectorScript">
        <Properties key="dev">
          <Property name="loggerALevel">DEBUG</Property>
        </Properties>
        <Properties key="prod">
          <Property name="leggerALevel">INFO</Property>
        </Properties>
      </ScriptPropertiesSelector>

> 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

Reply via email to