Lonny has asked for the wisdom of the Perl Monks concerning the following question:
I have a process that writes to a log file with a max size of 1 mb. My goal is to count events in this log file over a 24 hour period. Each event (snmp) is comprised of several lines in the log file. Each event begins with "enterprise:". Counting the events is simple enough.
My quandry lies in maintaining the filehandle on the log file for reading across the rotation. I.e. at MaxFileSize the log is renamed and a new log file is created by the same name. I thought there was a module that would handle this, however I am quickly coming to the realization that there is not.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Filehandle on rotating log
by idsfa (Vicar) on Oct 23, 2003 at 21:59 UTC | |
by Lonny (Novice) on Oct 23, 2003 at 22:03 UTC | |
by nevyn (Monk) on Oct 24, 2003 at 05:12 UTC | |
by Lonny (Novice) on Oct 24, 2003 at 18:56 UTC |