Name : perl-Log-Dispatch-FileRotate
| |
Version : 1.26
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 46.1
| Date : 2017-06-09 09:39:29
|
Group : Development/Libraries/Perl
| Source RPM : perl-Log-Dispatch-FileRotate-1.26-46.1.src.rpm
|
Size : 0.05 MB
| |
Packager : (none)
| |
Summary : Log to files that archive/rotate themselves
|
Description :
This module provides a simple object for logging to files under the Log::Dispatch::* system, and automatically rotating them according to different constraints. This is basically a Log::Dispatch::File wrapper with additions. To that end the arguments
name, min_level, filename and mode
behave the same as Log::Dispatch::File. So see its man page (perldoc Log::Dispatch::File)
The arguments size and max specify the maximum size and maximum number of log files created. The size defaults to 10M and the max number of files defaults to 1. If DatePattern is not defined then we default to working in size mode. That is, use size values for deciding when to rotate.
Once DatePattern is defined FileRotate will move into time mode. Once this happens file rotation ignores size constraints and uses the defined date pattern constraints.
If you setup a config file using Log::Log4perl::init_and_watch() or the like, you can switch between modes just by commenting out the DatePattern line.
When using DatePattern make sure TZ is defined correctly and that the TZ you use is understood by Date::Manip. We use Date::Manip to generate our recurrences. Bad TZ equals bad recurrences equals surprises! Read the Date::Manip man page for more details on TZ.
DatePattern will default to a daily rotate if your entered pattern is incorrect. You will also get a warning message.
If you have multiple writers that were started at different times you will find each writer will try to rotate the log file at a recurrence calculated from its start time. To sync all the writers just use a config file and update it after starting your last writer. This will cause Log::Dispatch::FileRotate->new() to be called by each of the writers close to the same time, and if your recurrences aren\'t too close together all should sync up just nicely.
I initially assumed a long running 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.
We handle multiple writers using flock().
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/SLE_12/noarch |
Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server
Provides :
perl(Log::Dispatch::FileRotate)
perl-Log-Dispatch-FileRotate
Requires :