Hi,

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 
alright. 
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=
"ch.qos.logback.core.rolling.RollingFileAppender">
 
                <file>${LOGS.DIR}/osail.log</file> <!-- Ignored if prudent 
true -->
                <append>true</append>
 
        <rollingPolicy class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
                <!-- daily rollover -->
                <fileNamePattern>${LOGS.DIR}/osail.%d{yyyy-MM-dd}.%i.log</
fileNamePattern>

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

</configuration>

Best regards,
Stephan

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.
_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to