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 "Ralph Goers (JIRA)" <ji...@apache.org> on 2013/07/30 08:25:50 UTC

[jira] [Commented] (LOG4J2-326) request to improve the RoutingAppender

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

Ralph Goers commented on LOG4J2-326:
------------------------------------

I'm not entirely sure an enhancement is required.  Have you tried specifying a Route like below? The leading "$" should get stripped with the configuration is processed leaving a value of "${ctxLfrults}", which won't be replaced because the Route element does not perform variable substitution on the key. Since the result of an undefined variable string is to leave the string alone this should result in a match.
{code}
<Route key="$${ctx:fruits}">
  <RollingFile name="Rolling-default" fileName="logs/default.log"
	filePattern="./logs/${date:yyyy-MM}/default-%d{yyyy-MM-dd}-%i.log.gz">
    <PatternLayout>
	<pattern>%d{ISO8601} [%t] %p %c{3} %L - %m%n</pattern>
    </PatternLayout>
    <Policies>
      <TimeBasedTriggeringPolicy interval="6" modulate="true" />
      <SizeBasedTriggeringPolicy size="10 MB" />
    </Policies>
  </RollingFile>
</Route>
{code}
                
> request to improve the RoutingAppender
> --------------------------------------
>
>                 Key: LOG4J2-326
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-326
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Appenders
>            Reporter: Sudharma Puranik
>
> Routing Appender has to be improved in a way that it can handle default appenders in a better way.! Please refer this JIRA for more details
> https://issues.apache.org/jira/browse/LOG4J2-314

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org