logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache <ralph.go...@dslextreme.com>
Subject Re: Zipped rolling file - name of file entry
Date Thu, 08 Dec 2016 15:58:57 GMT
That indeed does seem strange. I will have to try it myself. You may have found a bug.

Ralph

> On Dec 8, 2016, at 7:07 AM, Greg Thomas <greg.d.thomas@gmail.com> wrote:
> 
> 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



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message