[qos.ch-announce] ch.qos.logback.core.rolling.TimeBasedRollingPolicy writes a new log in the rolled over log

QOS.ch annoucements announce at qos.ch
Tue Sep 2 15:37:32 CEST 2014


Team,

My logback.xml is as follows:

*<appender name="SIFT" 
class="ch.qos.logback.classic.sift.SiftingAppender">**
**  <sift>**
**    <appender name="FILE-Application" 
class="ch.qos.logback.core.rolling.RollingFileAppender">**
**<file>log/application/application.log</file>**
**      <rollingPolicy 
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">**
**        <!-- daily rollover -->**
**<fileNamePattern>log/application/application.log.%d{yyyyMMdd}</fileNamePattern>**
**      </rollingPolicy>**
**      <encoder>**
**        <pattern>%date %X{req.remoteHost} %X{sessionID} 
%X{userIDCookie} %X{userEmailID} %X{req.requestURI} %level %logger{10} 
%msg%n</pattern>**
**      </encoder>**
**    </appender> **
**  </sift>**
**</appender>**
**
**<root level="debug">**
**  <appender-ref ref="SIFT" />**
**</root>*


My log4j.properties is as follows:

*### direct log messages to stdout ###**
**log4j.appender.stdout=org.apache.log4j.ConsoleAppender**
**log4j.appender.stdout.Target=System.out**
**log4j.appender.stdout.layout=org.apache.log4j.PatternLayout**
**log4j.appender.stdout.layout.ConversionPattern=%d{MMM-dd at HH:mm:ss} %5p 
%c{1}:%L - %m%n**
**
**### set log levels - for more verbose logging change 'info' to 'debug' 
###**
**log4j.rootLogger=debug, stdout**
**log4j.logger.org.apache.commons.beanutils.BeanUtils=WARN **
**log4j.logger.org.apache.commons.beanutils.ConvertUtils=WARN **
**log4j.logger.org.apache.commons.beanutils.PropertyUtils=WARN **
**log4j.logger.org.apache.commons.beanutils.PropertyUtilsBean=WARN *

I have a problem where the roller over log writes the new log in it.

For example, Lets keep on Sep 1 2014 log is written in application.log 
and on the midnight the application.log.20140901 is rolled back and new 
log is still written in both application.log.20140901 and 
application.log.. Then on September 02 midnight the 
application.log.20140902 is created and new logs on September 3 is 
written in both application.log and application.log.20140902.., this way 
logs rolled back is writing the new logs in them.Thus the 
application.log.20140901has logs of September 02 and
application.log.20140902 as logs on September 03.

I am using the 1.0.13 version of logback jar.

My app server is resin-3.0.22, web server is apache-2.2.22 and java 
version is jdk-1.5.

Please can you answer why this issue happens??

Thanks,
Shiva Ranjith .R



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/announce/attachments/20140902/23bc5013/attachment.html>


More information about the announce mailing list