Hi,

I am using the following configuration for logging:

log4j.rootLogger=DEBUG, file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=myapp.log
log4j.appender.file.MaxFileSize=100000KB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d [%t] [%-5p]: %m%n


In this case, at the end of the run, I get 8 log files (myapp.log.7, ....,
myapp.log.1, myapp.log)

I am facing an issue wherein the first backup of log file (myapp.log.7) is
corrupt, meaning all lines except last two lines in the file are deleted!.
This happens only for the first backup, all the other backups are fine.

I am not able to figure out where exactly I am supposed to look for
debugging the issue.
Could someone please give me some idea about it?


Thanks,
Sunny

Reply via email to