Bug 38874 - Roll over functionality does not occure correctly. Writing to files even after reaching MaxFileSize
Summary: Roll over functionality does not occure correctly. Writing to files even afte...
Status: RESOLVED DUPLICATE of bug 17498
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Appender (show other bugs)
Version: 1.2
Hardware: Sun SunOS
: P3 normal
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-07 08:53 UTC by satya sai babu
Modified: 2007-08-22 19:08 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description satya sai babu 2006-03-07 08:53:33 UTC
Roll-over functionality does not work correctly for log files.

After reaching the size limit,  2 new files have been created intead of 1

Moreover, the integration writes to all 3 files!

The configuration file follows....
log4j.rootCategory=, A1

# A1 is set to be a FileAppender which outputs to System.out.
log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.File=/home/aiprd/log/main_comptel01/main_comptel01.log
log4j.appender.A1.MaxFileSize=51200KB
log4j.appender.A1.MaxBackupIndex=9
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d %-5p [%t] %-20c %3x - %m%n


The output of ls -ltr command

Gateway RTPPRD $ ls -ltr /home/aiprd/log/main_comptel01/main_comptel01.log*
-rw-rw-r--   1 aiprd    mqm      52429018 Jan 18 
09:00 /home/aiprd/log/main_comptel01/main_comptel01.log.2
-rw-rw-r--   1 aiprd    mqm      59300842 Jan 19 
10:43 /home/aiprd/log/main_comptel01/main_comptel01.log.4
-rw-rw-r--   1 aiprd    mqm      46799047 Jan 19 
10:43 /home/aiprd/log/main_comptel01/main_comptel01.log.3
-rw-rw-r--   1 aiprd    mqm      88136756 Jan 25 
23:34 /home/aiprd/log/main_comptel01/main_comptel01.log.1
-rw-rw-r--   1 aiprd    mqm      45654866 Jan 30 
11:33 /home/aiprd/log/main_comptel01/main_comptel01.log
Comment 1 Kay Abendroth 2006-11-12 05:57:45 UTC
Does it also occur with 1.2.14?
Comment 2 Chris Heisterkamp 2007-01-22 12:15:08 UTC
Are you using the RollingFileAppender in a webapp?

If so, this is probably related to Bug 17498
Comment 3 Curt Arnold 2007-08-22 19:08:53 UTC

*** This bug has been marked as a duplicate of 17498 ***