SYNOPSIS

DESCRIPTION

Sys::Syslog is an interface to the UNIX syslog(3) program. Call syslog() with a string priority and a list of printf() args just like syslog(3).

Syslog provides the functions:

openlog $ident, $logopt, $facility

$ident is prepended to every message. $logopt contains one or more of the words pid, ndelay, cons, nowait. $facility specifies the part of the system

syslog $priority, $format, @args

If $priority permits, logs ($format, @args) printed as by printf(3V), with the addition that %m is replaced with "$!" (the latest error message).

setlogmask $mask_priority

Sets log mask $mask_priority and returns the old mask.

setlogsock $sock_type

Sets the socket type to be used for the next call to openlog() or syslog().

A value of 'unix' will connect to the UNIX domain socket returned by _PATH_LOG in syslog.ph. If syslog.ph fails to define _PATH_LOG, setlogsock returns undef; otherwise a true value is returned. A value of 'inet' will connect to an INET socket returned by getservbyname(). Any other value croaks.