logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LOG4J2-1686) Support conditional configuration
Date Mon, 14 Nov 2016 05:24:58 GMT

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

Ralph Goers edited comment on LOG4J2-1686 at 11/14/16 5:24 AM:
---------------------------------------------------------------

Yes, we have to make an AppenderSelector (which we already did). I'm not sure how a LoggerSelector
makes a lot of sense - you want to use a Script at runtime to figure out which LoggerConfig
element you want the log event to be processed by rather than using the normal way of selecting
the Logger? That would require a lot more work than you might realize and would cause havoc
with checking if the logging level is enabled or not.

Rather than looking for something general can you state what the problem is that you are having
that you need to have solved?

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?  The difference here
is that with the AppenderSelector the script decides which Appender should be instantiated
and then only that one is created, so no sockets or files are opened for the ones that are
not selected.


was (Author: ralph.goers@dslextreme.com):
Yes, we have to make an AppenderSelector (which we already did). I'm not sure how a LoggerSelector
makes a lot of sense - you want to use a Script at runtime to figure out which LoggerConfig
element you want the log event to be processed by rather than using the normal way of selecting
the Logger? That would require a lot more work than you might realize and would cause havoc
with checking if the logging level is enabled or not.

Rather than looking for something general can you state what the problem is that you are having
that you need to have solved?

> 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-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message