You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Shun (Jira)" <ji...@apache.org> on 2021/10/24 16:50:00 UTC

[jira] [Updated] (LOG4J2-3180) AbstractRolloverStrategy:getEligibleFiles(): The file name cannot match normally when it has special characters of regular expression (such as: [] {})

     [ https://issues.apache.org/jira/browse/LOG4J2-3180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shun updated LOG4J2-3180:
-------------------------
    Summary: AbstractRolloverStrategy:getEligibleFiles():  The file name cannot match normally when it has special characters of regular expression (such as: [] {})  (was: AbstractRolloverStrategy:getEligibleFiles(),If the file name has special characters of regular expression (such as: [] {}), the file name cannot match normally)

> AbstractRolloverStrategy:getEligibleFiles():  The file name cannot match normally when it has special characters of regular expression (such as: [] {})
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-3180
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3180
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders, Core
>    Affects Versions: 2.14.1
>            Reporter: Shun
>            Priority: Minor
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Configuration status="ERROR">
>  <Appenders>
>  <Console name="Console" target="SYSTEM_OUT">
>  <PatternLayout pattern="%d\{HH:mm:ss.SSS} [%t] %-5level %logger\{36} - %msg%n"/>
>  </Console>
>  <Routing name="Routing">
>  <Routes pattern="$${ctx:param}">
>  <Route>
>  <RollingFile name="Rolling" fileName="./log/${ctx:param}.log"
>  filePattern="./log/${ctx:param}_%i.log">
>  <PatternLayout>
>  <pattern>%d %p %c\{1.} [%t] %m%n</pattern>
>  </PatternLayout>
>  <SizeBasedTriggeringPolicy size="1KB" />
>  </RollingFile>
>  </Route>
>  </Routes>
>  <!--<IdlePurgePolicy timeToLive="15" timeUnit="minutes"/>-->
>  </Routing>
>  </Appenders>
>  <Loggers>
>  <Root level="ALL">
>  <AppenderRef ref="Console"/>
>  <AppenderRef ref="Routing"/>
>  </Root>
>  </Loggers>
> </Configuration>
>  
>  
> filePattern="./log/${ctx:param}_%i.log" will never increase when the "param" is set like 
> ThreadContext.put("param", "{color:#FF0000}[{color}Just For Test{color:#FF0000}]{color}");
> ".



--
This message was sent by Atlassian Jira
(v8.3.4#803005)