Log::Dispatch::File::Rolling

Log::Dispatch::File::Rolling is a Perl object for logging to date/time/pid stamped files.
Download

Log::Dispatch::File::Rolling Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • M. Jacob
  • Publisher web site:
  • http://search.cpan.org/~jacob/Log-Dispatch-File-Rolling-1.05/lib/Log/Dispatch/File/Rolling.pm

Log::Dispatch::File::Rolling Tags


Log::Dispatch::File::Rolling Description

Log::Dispatch::File::Rolling is a Perl object for logging to date/time/pid stamped files. Log::Dispatch::File::Rolling is a Perl object for logging to date/time/pid stamped files.SYNOPSIS use Log::Dispatch::File::Rolling; my $file = Log::Dispatch::File::Rolling->new( name => 'file1', min_level => 'info', filename => 'Somefile%d{yyyyMMdd}.log', mode => 'append' ); $file->log( level => 'emerg', message => "I've fallen and I can't get upn" );ABSTRACTThis module provides an object for logging to files under the Log::Dispatch::* system.This module subclasses Log::Dispatch::File for logging to date/time stamped files. See Log::Dispatch::File for instructions on usage. This module differs only on the following three points:fork()-safeThis module will close and re-open the logfile after a fork.multitasking-safeThis module uses flock() to lock the file while writing to it.stamped filenamesThis module supports a special tag in the filename that will expand to the current date/time/pid.It is the same tag Log::Log4perl::Layout::PatternLayout uses, see Log::Log4perl::Layout::PatternLayout, chapter "Fine-tune the date". In short: Include a "%d{...}" in the filename where "..." is a format string according to the SimpleDateFormat in the Java World (http://java.sun.com/j2se/1.3/docs/api/java/text/SimpleDateFormat.html). See also Log::Log4perl::DateFormat for information about further restrictions.In addition to the format provided by Log::Log4perl::DateFormat this module also supports '$' for inserting the PID. Repeat the character to define how many character wide the field should be. This should not be needed regularly as this module also supports logfile sharing between processes, but if you've got a high load on your logfile or a system that doesn't support flock()... Requirements: · Perl


Log::Dispatch::File::Rolling Related Software