Alex,
Are you running under Windows? If you have multiple apps writing
to the same log files, Windows holds a lock on the files. This
prevents log4j from renaming the log files to create the
archives. Thus when log4j thinks it's writing to a new file, it's
actually overwriting the old file.

There are some workaround patches to log4j floating around that
addresses this. I believe the next version of log4j will as well.

Dave Jones
NetEffect

At 03:20 PM 3/8/04 -0500, you wrote:
>Check out this config:
>
>###########################################################
>## Root logging
>###########################################################
>
>log4j.rootCategory=WARN, A
>
>log4j.appender.A=org.apache.log4j.RollingFileAppender
>log4j.appender.A.File=../logs/applications/common.log
>
>log4j.appender.A.MaxFileSize=500KB
>log4j.appender.A.MaxBackupIndex=30
>
>log4j.appender.A.layout=org.apache.log4j.PatternLayout
>log4j.appender.A.layout.ConversionPattern=%d %-5p %-32c{1} - %m%n
>
>###########################################################
>## Security logging
>###########################################################
>
>log4j.category.edu.suny.sysadm.common.security=WARN, SEC
>log4j.additivity.edu.suny.sysadm.common.security=false
>
>log4j.appender.SEC=org.apache.log4j.RollingFileAppender
>log4j.appender.SEC.File=../logs/applications/security.log
>log4j.appender.SEC.MaxFileSize=500KB
>log4j.appender.SEC.MaxBackupIndex=30
>log4j.appender.SEC.layout=org.apache.log4j.PatternLayout
>log4j.appender.SEC.layout.ConversionPattern=%d %-5p %-32c{1} - %m%n
>
>###########################################################
>## EnrollmentMgmt logging
>###########################################################
>
>log4j.category.edu.suny.sysadm.enrollmentmgmt=WARN, EM
>log4j.additivity.edu.suny.sysadm.enrollmentmgmt=false
>
>log4j.appender.EM=org.apache.log4j.RollingFileAppender
>log4j.appender.EM.File=../logs/applications/enrollmentmgmt/enrollmentmgm
>t.log
>log4j.appender.EM.MaxFileSize=500KB
>log4j.appender.EM.MaxBackupIndex=30
>log4j.appender.EM.layout=org.apache.log4j.PatternLayout
>log4j.appender.EM.layout.ConversionPattern=%d %-5p %-32c{1} - %m%n
>
>## OAS logging
>
>log4j.category.edu.suny.sysadm.enrollmentmgmt.oas=WARN, OAS
>log4j.additivity.edu.suny.sysadm.enrollmentmgmt.oas=false
>
>log4j.appender.OAS=org.apache.log4j.RollingFileAppender
>log4j.appender.OAS.File=../logs/applications/enrollmentmgmt/oas.log
>log4j.appender.OAS.MaxFileSize=500KB
>log4j.appender.OAS.MaxBackupIndex=30
>
>log4j.appender.OAS.layout=org.apache.log4j.PatternLayout
>log4j.appender.OAS.layout.ConversionPattern=%d %-5p %-32c{1} - %m%n
>
>## RRC logging
>
>log4j.category.edu.suny.sysadm.enrollmentmgmt.rrc=WARN, RRC
>log4j.additivity.edu.suny.sysadm.enrollmentmgmt.rrc=false
>
>log4j.appender.RRC=org.apache.log4j.RollingFileAppender
>log4j.appender.RRC.File=../logs/applications/enrollmentmgmt/rrc.log
>log4j.appender.RRC.MaxFileSize=500KB
>log4j.appender.RRC.MaxBackupIndex=30
>
>log4j.appender.RRC.layout=org.apache.log4j.PatternLayout
>log4j.appender.RRC.layout.ConversionPattern=%d %-5p %-32c{1} - %m%n
>
>None of the logs files are rolling, they all overwrite themselves..
>
>Any ideas?
>
>- Alex
>
>----------
>[
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to