[logback-user] logback-1.0.3 - Rolled over log file was overwritten instead of incremented

Stephan Olbertz SOlbertz at orga-systems.com
Tue Jun 19 09:04:06 CEST 2012


as it says in the title, I use logback 1.0.3 and I encountered a problem 
last night.

My application was started in two separate instances and it was logging 
I have it set up to do a rollover on midnight and when the file reaches a 
certain size.

On 00:38 a rollover happened initiated by one of the instances to file "
osail.2012-06-18.0.log"and I assume it went through alright.
But, on 00:58 the second instance was done and it also initiated a 
rollover and it also rolled over to file "osail.2012-06-18.0.log". 
Overwriting the first file.

I assumed it would have switched to file "osail.2012-06-18.1.log" but that 
was not the case? Can any body help me out, here?

For reference, this is my logback.xml:

<configuration debug="true">
        <property name="LOGS.DIR" value=
"/nfs/us08/rm_info/protex_scan/logs" />
        <appender name="FILE" class=
                <file>${LOGS.DIR}/osail.log</file> <!-- Ignored if prudent 
true -->
        <rollingPolicy class=
                <!-- daily rollover -->

                <timeBasedFileNamingAndTriggeringPolicy class=
                        <!-- or whenever the file size reaches 3MB -->
                <!-- keep 5 days' worth of history -->
                <!-- encoders are assigned the type 
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
                        <!-- <pattern>%-4relative [%thread] %-5level 
%logger{35} - %msg%n</pattern>-->
                        <pattern>%d [%thread] %-5level %logger{36} - 
        <root level="DEBUG">
                <appender-ref ref="FILE" />


Best regards,

The information included in this e-mail and any files transmitted with it is strictly confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately by e-mail and delete this e-mail as well as any attachment from your system. If you are not the intended recipient you are not authorized to use and/or copy this message and/or attachment and/or disclose the contents to any other person.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20120619/187eb9c7/attachment.html>

More information about the Logback-user mailing list