How to skeep the DailyRolling if the process can't rename the log file.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Miguel_Cruz
Posted On:   Friday, July 24, 2009 04:10 PM

I lost my one day log file when the logger couldn't rename the file and then it overwrites the original one. So, the cuestion, is how can I avoid the file lost. This are the messages from the server log. [7/24/09 0:03:51:322 CDT] 1bdeeb84 SystemErr R log4j:ERROR Failed to rename [I:WebSphereAppServerlogsSaraLog.log] to [I:WebSphereAppServerlogsSaraLog.log.2009-07-23]. [7/24/09 0:03:51:385 CDT] 1bdeeb84 SystemErr R log4j:ERROR Failed to rename [I:WebSphereAppServerlogsSaraLogError.log] to [I:WebSphereAppServerlogsSaraLogError.log.2009-07-23]. Here is my log4j.properties file log4j.logger.mx.gob.sara=DEBUG,console,archive,archiveError log   More>>

I lost my one day log file when the logger couldn't rename the file and then it overwrites the original one. So, the cuestion, is how can I avoid the file lost.


This are the messages from the server log.


[7/24/09 0:03:51:322 CDT] 1bdeeb84 SystemErr R log4j:ERROR Failed to rename [I:WebSphereAppServerlogsSaraLog.log] to [I:WebSphereAppServerlogsSaraLog.log.2009-07-23].


[7/24/09 0:03:51:385 CDT] 1bdeeb84 SystemErr R log4j:ERROR Failed to rename [I:WebSphereAppServerlogsSaraLogError.log] to [I:WebSphereAppServerlogsSaraLogError.log.2009-07-23].



Here is my log4j.properties file


log4j.logger.mx.gob.sara=DEBUG,console,archive,archiveError
log4j.logger.mx.com.infonavit.sara=DEBUG,console,archive,archiveError
log4j.logger.com.infonavit.sara=DEBUG,console,archive,archiveError
log4j.logger.mx.gob.infonavit.sara=DEBUG,console,archive,archiveError


log4j.appender.console.Threshold=DEBUG
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.Target=System.out
log4j.appender.console.ImmediateFlush=true
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%-5p [%c] %m%n


log4j.appender.archive=org.apache.log4j.DailyRollingFileAppender
log4j.appender.archive.Threshold=DEBUG
log4j.appender.archive.File=C:/prueba/SaraLog.log
log4j.appender.archive.Append=true
log4j.appender.archive.DatePattern='.'yyyy-MM-dd
log4j.appender.archive.layout=org.apache.log4j.PatternLayout
log4j.appender.archive.layout.ConversionPattern= %d %-5p [%c: %L] %m%n


log4j.appender.archiveError=org.apache.log4j.DailyRollingFileAppender
log4j.appender.archiveError.Threshold=ERROR
log4j.appender.archiveError.File=C:/prueba/SaraLogError.log
log4j.appender.archiveError.Append=true
log4j.appender.archiveError.DatePattern='.'yyyy-MM-dd
log4j.appender.archiveError.layout=org.apache.log4j.PatternLayout
log4j.appender.archiveError.layout.ConversionPattern= %d %-5p [%c: %L] %m%n


thanks a lot

   <<Less
About | Sitemap | Contact