Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

log::dispatch::syslog(3pm) [debian man page]

Log::Dispatch::Syslog(3pm)				User Contributed Perl Documentation				Log::Dispatch::Syslog(3pm)

NAME
Log::Dispatch::Syslog - Object for logging to system log. VERSION
version 2.32 SYNOPSIS
use Log::Dispatch; my $log = Log::Dispatch->new( outputs => [ [ 'Syslog', min_level => 'info', ident => 'Yadda yadda' ] ] ); $log->emerg("Time to die."); DESCRIPTION
This module provides a simple object for sending messages to the system log (via UNIX syslog calls). Note that logging may fail if you try to pass UTF-8 characters in the log message. If logging fails and warnings are enabled, the error message will be output using Perl's "warn". CONSTRUCTOR
The constructor takes the following parameters in addition to the standard parameters documented in Log::Dispatch::Output: o ident ($) This string will be prepended to all messages in the system log. Defaults to $0. o logopt ($) A string containing the log options (separated by any separator you like). See the openlog(3) and Sys::Syslog docs for more details. Defaults to ''. o 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' o socket ($ or @) Tells what type of socket to use for sending syslog messages. Valid options are listed in "Sys::Syslog". If you don't provide this, then we let "Sys::Syslog" simply pick one that works, which is the preferred option, as it makes your code more portable. If you pass an array reference, it is dereferenced and passed to "Sys::Syslog::setlogsock()". AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT AND LICENSE
This software is Copyright (c) 2011 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) perl v5.14.2 2012-05-25 Log::Dispatch::Syslog(3pm)

Check Out this Related Man Page

Agent::Channel::Syslog(3pm)				User Contributed Perl Documentation			       Agent::Channel::Syslog(3pm)

NAME
Log::Agent::Channel::Syslog - syslog logging channel for Log::Agent::Logger SYNOPSIS
require Log::Agent::Channel::Syslog; my $channel = Log::Agent::Channel::Syslog->make( # Specific attributes -prefix => prefix, -facility => "user", -showpid => 1, -socktype => "unix", -logopt => "ndelay", ); DESCRIPTION
The syslog logging channels directs operations to syslog() via the Sys::Syslog(3) interface. The creation routine make() takes the following switches: "-facility" => facility Tell syslog() which facility to use (e.g. "user", "auth", "daemon"). Unlike the Sys::Syslog(3) interface, the facility is set once and for all: every message logged through this channel will use the same facility. "-logopt" => syslog options Specifies logging options, under the form of a string containing zero or more of the words ndelay, cons or nowait. "-prefix" => prefix The prefix here is syslog's identification string. "-showpid" => flag Set to true to have the PID of the process logged. It is false by default. "-socktype" => (unix | inet) Specifies the logging socket type to use. The default behaviour is to use Sys:Syslog's default. AUTHOR
Raphael Manfredi <Raphael_Manfredi@pobox.com> SEE ALSO
Log::Agent::Logger(3). perl v5.10.0 2002-03-09 Agent::Channel::Syslog(3pm)
Man Page