Seweryn Habdank-Wojewodzki created LOG4J2-2121:
--------------------------------------------------
Summary: DefaultRolloverStrategy max = 5 does not limit nuber of
files
Key: LOG4J2-2121
URL: https://issues.apache.org/jira/browse/LOG4J2-2121
Project: Log4j 2
Issue Type: Question
Environment: Linux RedHat
Reporter: Seweryn Habdank-Wojewodzki
Dears,
I have very simple configuration of the RollingFile appender
{{ <RollingFile name="RollingFile"
fileName="${env:LOG_DIR}/${application}/endpoint.log"
filePattern="$${env:LOG_DIR}/$${application}/$${date:yyyy-MM}/endpoint-%d{yyyy-MM-dd}-%i.log">
<PatternLayout>
<Pattern>%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n</Pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy />
</Policies>
<DefaultRolloverStrategy max="5"/>
</RollingFile>
}}
This configuration works partly good. Every day there is created file in folder
_YYYY-MM_.
That is expected.
What is not expected - it is that the process is not limited at all. I mean
there are more than 5 files in all folders.
Questions:
Is it something wrong with configuration?
is max=5 considered to be the numeber of files or folders (in my case months)?
or max=5 is ignored at all.
Thanks in advance for help.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)