Log::Dispatch::Syslog(3pm) User Contributed Perl Documentation Log::Dispatch::Syslog(3pm)
NAME
Log::Dispatch::Syslog - Object for logging to system log.
SYNOPSIS
use Log::Dispatch::Syslog;
my $file = Log::Dispatch::Syslog->new( name => 'file1',
min_level => 'info',
ident => 'Yadda yadda' );
$file->log( level => 'emerg', message => "Time to die." );
DESCRIPTION
This module provides a simple object for sending messages to the system log (via UNIX sys-
log calls).
METHODS
* new(%p)
This method takes a hash of parameters. The following options are valid:
* name ($)
The name of the object. Required.
* min_level ($)
The minimum logging level this object will accept. See the Log::Dispatch doc-
umentation for more information. Required.
* max_level ($)
The maximum logging level this obejct will accept. See the Log::Dispatch doc-
umentation for more information. This is not required. By default the maxi-
mum is the highest possible level (which means functionally that the object
has no maximum).
* ident ($)
This string will be prepended to all messages in the system log. Defaults to
$0.
* logopt ($)
A string containing the log options (separated by any separator you like).
Valid options are 'cons', 'pid', 'ndelay', and 'nowait'. See the openlog(3)
and Sys::Syslog docs for more details. I would suggest not using 'cons' but
instead using Log::Dispatch::Screen. Defaults to ''.
* facility ($)
Specifies what type of program is doing the logging to the system log. Valid
options are 'auth', 'authpriv', 'cron', 'daemon', 'kern', 'local0' through
'local7', 'mail, 'news', 'syslog', 'user', 'uucp'. Defaults to 'user'
* socket ($)
Tells what type of socket to use for sending syslog messages. Valid options
are 'unix' or 'inet'. Defaults to 'inet'.
* callbacks( \& or [ \&, \&, ... ] )
This parameter may be a single subroutine reference or an array reference of
subroutine references. These callbacks will be called in the order they are
given and passed a hash containing the following keys:
( message => $log_message, level => $log_level )
The callbacks are expected to modify the message and then return a single
scalar containing that modified message. These callbacks will be called when
either the "log" or "log_to" methods are called and will only be applied to a
given message once.
* log_message( message => $ )
Sends a message to the appropriate output. Generally this shouldn't be called
directly but should be called through the "log()" method (in Log::Dispatch::Output).
AUTHOR
Dave Rolsky, <autarch AT urth.org>
perl v5.8.4 2004-08-07 Log::Dispatch::Syslog(3pm)
Generated by $Id: phpMan.php,v 4.49 2006/02/26 13:18:18 chedong Exp $ Author: Che Dong
On Apache/2.0.61 (Unix) PHP/4.4.7 mod_ssl/2.0.61 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.4.2
Under GNU General Public License
2009-01-06 14:58 @38.103.63.57 Crawled by CCBot/1.0 (+http://www.commoncrawl.org/bot.html)