I'm using a RollingFileAppender, configured similar to ...
<Appenders>
<RollingFile name="rf" fileName="../logs/my.log"
filePattern="../logs/my.%i.log.zip">
<PatternLayout>
<pattern>%d %-5p [%c{1}] %X - %m%n</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
<DefaultRolloverStrategy max="20"/>
</RollingFile>
</Appenders>
So far so good. I get 20 logs files, my.1.log.zip -> my.20.log.zip, as I
would expect.
However, the file contained with "my.20.log.zip" is called ...
"my.1.log.zip". In fact, every log file contains a file of the same name,
"my.1.log.zip".
Whilst I can see why this would be the case, it still breaks the principle
of least surprise in my mind. Is there a configuration option I can use to
avoid this - or any other mechanism I missed that would use a more natural
file naming mechanism?
Thanks,
Greg