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

Matt Sicker edited comment on LOG4J2-1308 at 3/6/16 9:36 PM:
-------------------------------------------------------------

Although I'm noticing that supporting this is much less straightforward for 
logger names as those can contain periods (while the other names normally 
don't). I'd hate to make a special case for that, but it's always refactorable!

Edit: nevermind, logger names are specified as rvals, not lvals, so that is 
much easier than I thought.


was (Author: jvz):
Although I'm noticing that supporting this is much less straightforward for 
logger names as those can contain periods (while the other names normally 
don't). I'd hate to make a special case for that, but it's always refactorable!

> Remove need to pre-specify appender names et al. in property file config 
> format
> -------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1308
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1308
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Configurators
>    Affects Versions: 2.4, 2.5
>            Reporter: Matt Sicker
>            Assignee: Matt Sicker
>
> In the .properties config file format, several plugin types currently require 
> you to declare names ahead of time. For instance:
> {code}
> status = ERROR
> filters = Threshold
> filter.Threshold.type = ThresholdFilter
> filter.Threshold.level = DEBUG
> appenders = Stdout
> appender.Stdout.type = Console
> appender.Stdout.name = StdOut
> appender.Stdout.target = SYSTEM_OUT
> appender.Stdout.layout.type = PatternLayout
> appender.Stdout.layout.pattern = %d [%t] %-5level: %msg%n%throwable
> appender.Stdout.filters = marker
> appender.Stdout.filter.marker.type = MarkerFilter
> appender.Stdout.filter.marker.onMatch = DENY
> appender.Stdout.filter.marker.onMisMatch = NEUTRAL
> appender.Stdout.filter.marker.marker = FLOW
> loggers = log4j
> logger.log4j.name = org.apache.logging.log4j
> logger.log4j.appenderRefs = console
> logger.log4j.appenderRef.console.ref = StdOut
> logger.log4j.level = DEBUG
> logger.log4j.additivity = false
> rootLogger.appenderRefs = console
> rootLogger.appenderRef.console.ref = StdOut
> rootLogger.level = ERROR
> {code}
> would be transformed into
> {code}
> status = ERROR
> filter.Threshold.type = ThresholdFilter
> filter.Threshold.level = DEBUG
> appender.Stdout.type = Console
> appender.Stdout.name = StdOut
> appender.Stdout.target = SYSTEM_OUT
> appender.Stdout.layout.type = PatternLayout
> appender.Stdout.layout.pattern = %d [%t] %-5level: %msg%n%throwable
> appender.Stdout.filter.marker.type = MarkerFilter
> appender.Stdout.filter.marker.onMatch = DENY
> appender.Stdout.filter.marker.onMisMatch = NEUTRAL
> appender.Stdout.filter.marker.marker = FLOW
> logger.log4j.name = org.apache.logging.log4j
> logger.log4j.appenderRef.console.ref = StdOut
> logger.log4j.level = DEBUG
> logger.log4j.additivity = false
> rootLogger.appenderRef.console.ref = StdOut
> rootLogger.level = ERROR
> {code}
> These names should be inferable by their first usage. Then the appenders, 
> filters, loggers, etc., properties can all be safely ignored for backwards 
> compatibility with 2.4/2.5.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to