[ 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to