Look at the link below. http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html
'.'yyyy-MM-dd-a Rollover at midnight and midday of each day. At noon, on March 9th, 2002, /foo/bar.log will be copied to /foo/bar.log.2002-03-09-AM. Logging for the afternoon of the 9th will be output to /foo/bar.log until it is rolled over at midnight. Thanks Ram [EMAIL PROTECTED] tststs wrote: > > I am using log4j for logging. I am working on a huge application and there > would be lots of logs each day. Thereby it is requried that the log files > be stored and renamed each day. The date is appended to the log file and > that day's log file is stored. The logs start writing afresh each day. The > problem here is that at times the application simply starts logging to the > previous day's log file, for a while, and then starts writing back to the > current day's file again. I am not able to figure out what goes wrong and > when. The application is running on weblogic. Can anybody please help? The > log4j properties file is here > > log4j.rootCategory=DEBUG, dest1, dest2, dest3 > > log4j.appender.dest1=org.apache.log4j.DailyRollingFileAppender > log4j.appender.dest1.DatePattern='.'yyyy-MM-dd > log4j.appender.dest1.Threshold=info > log4j.appender.dest1.File=info.log > log4j.appender.dest1.layout=org.apache.log4j.PatternLayout > log4j.appender.dest1.layout.ConversionPattern=%d [%t: %C.%M:%L] %p: %m%n > > .... > Thank in advance!!! > -- View this message in context: http://www.nabble.com/daily-rolling-log4j-tp14147145p16966997.html Sent from the Log4j - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
