DailyRollingFileAppender writing to previous date file
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   santosh_sougrakpam
Posted On:   Wednesday, April 16, 2003 02:43 AM

I am using log4j in a multithreaded envrionment in a web application. All the log messages are sent to a buffered queue and a thread clears the buffer and write to a file app.log. The files rollover every day. However, I am seeing a strange behaviour intermittently in the log files. For example, the file app.log.2003-03-10 is truncated and i see log messages of 2003-03-11 in this file, while app.log looks fine at that point of time till it is rollover next day. It seems my threads are still writing to both app.log and app.log.2003-03-10 at the same time. It looks like that after a thread rollover the files, the subsequent threads fails to recognise this and it stills overwrites in the rollovered file.    More>>

I am using log4j in a multithreaded envrionment in a web application. All the log messages are sent to a buffered queue and a thread clears the buffer and write to a file app.log. The files rollover every day. However, I am seeing a strange behaviour intermittently in the log files.

For example, the file app.log.2003-03-10 is truncated and i see log messages of 2003-03-11 in this file, while app.log looks fine at that point of time till it is rollover next day.

It seems my threads are still writing to both app.log and app.log.2003-03-10 at the same time. It looks like that after a thread rollover the files, the subsequent threads fails to recognise this and it stills overwrites in the rollovered file.

   <<Less
About | Sitemap | Contact