You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Matt Sicker (JIRA)" <ji...@apache.org> on 2016/03/06 23:31:40 UTC
[jira] [Resolved] (LOG4J2-1308) Remove need to pre-specify appender
et al. identifiers in property file config format
[ https://issues.apache.org/jira/browse/LOG4J2-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Sicker resolved LOG4J2-1308.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.6
I've pushed this to master. I'll close this after you guys have taken a look.
> Remove need to pre-specify appender et al. identifiers 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
> Fix For: 2.6
>
>
> 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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org