logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Thomas <greg.d.tho...@gmail.com>
Subject Zipped rolling file - name of file entry
Date Thu, 08 Dec 2016 14:07:45 GMT
I'm using a RollingFileAppender, configured similar to ...

    <RollingFile name="rf" fileName="../logs/my.log"
            <pattern>%d %-5p [%c{1}] %X - %m%n</pattern>
            <SizeBasedTriggeringPolicy size="100 MB"/>
        <DefaultRolloverStrategy max="20"/>

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,

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?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message