From: DAY R. <Rog...@at...> - 2009-03-11 09:33:03
|
This from the web-page: "I initially aasumed a long runinng process but it seems people are using this module as part of short running CGI programs. So, now we look at the last modified time stamp of the log file and compare it to a previous occurance of a DatePattern, on startup only. If the file stat shows the mtime to be earlier than the previous recurrance then I rotate the log file." Which I take to mean it does do invocation-like rollovers. If this doesn't work, I'll resort to a custom file appender. I see what you mean about the valid date patterns. Implement in haste, repent at leisure. Also, apologies for the stupid .sig. I have no control over it. Roger -----Original Message----- From: Mike Schilli [mailto:m...@pe...] Sent: 11 March 2009 07:37 To: DAY Roger Cc: log4perl MailingList Subject: Re: [log4perl-devel] rotation on new run of script On Tue, 10 Mar 2009, DAY Roger wrote: > Every time I run a script, I'd like my log-file to roll over. I invoke > Log::Dispatch::FileRotate thusly >... > DatePattern => 'HH-dd-yyyy',); Hmm, this is neither a valid date pattern (yyyy-MM-dd-HH would be correct), according to the Log::Dispatch::FileRotate man page, nor does it claim to roll it on every invocation. You probably need something like a custom file appender for this. -- Mike Mike Schilli m...@pe... **************************************************************** The operating companies affiliated with Atradius N.V. (Atradius Group) conduct insurance, debt collection and information services business through their registered (branch) offices in many countries. For information about the main registration details of Atradius Group offices in your country please visit http://global.atradius.com/general-content/legal/legallist.html IMPORTANT NOTICE. This e-mail, including any and all attachments, is intended for the addressee or its representative only. It is confidential and may be under legal privilege. Any form of unauthorised use, publication, reproduction, copying or disclosure of the content of this e-mail is not permitted. If you are not the intended recipient of this e-mail and its contents, please notify the sender immediately by reply e-mail and delete this e-mail and all its attachments subsequently. Although this e-mail and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and/or opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by Atradius Group companies, either jointly or severally, for any loss or damage arising in any way from its use. E-mail received by Atradius Group can be stored for business purposes. **************************************** |