From: Robert J. <yad...@sn...> - 2007-02-15 21:09:58
|
At 03:06 PM 2/15/2007, John ORourke wrote: >It has this nifty feature built in, no need to write more code - see below.... >[snip] > > >From my log4perl.conf file: > >log4perl.logger.DataSite = DEBUG, DebugLog >log4perl.appender.DebugLog = Log::Dispatch::FileRotate >log4perl.appender.DebugLog.min_level=debug >log4perl.appender.DebugLog.max=10 >log4perl.appender.DebugLog.DatePattern=yyyy-MM-dd >log4perl.appender.DebugLog.TZ=UTC >log4perl.appender.DebugLog.filename=/tmp/debug_log >log4perl.appender.DebugLog.mode=append >log4perl.appender.DebugLog.layout=PatternLayout >log4perl.appender.DebugLog.layout.ConversionPattern =[%d] [%P] %M(%p) - %m%n > > > >The bit you want is DatePattern - it sets the pattern for the >rotated files - in your case: > >DatePattern=yyyyMMdd > >When the evaluated version of that changes, it will do the rename >and start a new file. Are you sure? The documentation for the module says this: "We don't use DatePattern to define the extension of the log file though." The DatePattern seems to define *when to rotate*, and does not affect the file extension. Are you saying you have FileRotate working so that it renames using the DatePattern? Neither the docs nor the code (which I posted earlier) seem to support that... Rob |