From: Mike S. <m...@pe...> - 2009-03-11 17:24:20
|
On Wed, 11 Mar 2009, DAY Roger wrote: > That would work, cheers. I was thinking it'll be fun to write a custom > appender. No doubt, go for it :). -- Mike Mike Schilli m...@pe... > > I'll think on it. > > Roger > > > -----Original Message----- > From: Mike Schilli [mailto:m...@pe...] > Sent: 11 March 2009 15:41 > To: DAY Roger > Cc: Mike Schilli; log4perl MailingList > Subject: RE: [log4perl-devel] rotation on new run of script > > On Wed, 11 Mar 2009, DAY Roger wrote: > >> Which I take to mean it does do invocation-like rollovers. If this >> doesn't work, I'll resort to a custom file appender. > > Actually, you could use something like this: > > log4perl.appender.Logfile = Log::Log4perl::Appender::File > log4perl.appender.Logfile.filename = sub { "log-" . time() . ".log" > } > > to name your logfiles after the current timestamp? > > -- Mike > > Mike Schilli > m...@pe... > >> >> 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. >> **************************************** >> >> >> > |