Keep It Simple, Stupid | |
PerlMonks |
perlman:Sys::Syslogby root (Monk) |
on Dec 23, 1999 at 00:53 UTC ( [id://1240]=perlfunc: print w/replies, xml ) | Need Help?? |
Sys::SyslogSee the current Perl documentation for Sys::Syslog. Here is our local, out-dated (pre-5.6) version:
Sys::Syslog, openlog, closelog, setlogmask, syslog - Perl interface to the
UNIX
use Sys::Syslog; # all except setlogsock, or: use Sys::Syslog qw(:DEFAULT setlogsock); # default set, plus setlogsock
setlogsock $sock_type; openlog $ident, $logopt, $facility; syslog
Note that
EXAMPLES
openlog($program, 'cons,pid', 'user'); syslog('info', 'this is another test'); syslog('mail|warning', 'this is a better test: %d', time); closelog();
syslog('debug', 'this is the last test');
setlogsock('unix'); openlog("$program $$", 'ndelay', 'user'); syslog('notice', 'fooprogram: this is really done');
setlogsock('inet'); $! = 55; syslog('info', 'problem was %m'); # %m == $! in syslog(3)
DEPENDENCIES
Sys::Syslog needs syslog.ph, which can be created with
SEE ALSOsyslog(3)
AUTHORTom Christiansen <tchrist@perl.com> and Larry Wall <larry@wall.org>. UNIX domain sockets added by Sean Robinson <robinson_s@sc.maricopa.edu> with support from Tim Bunce <Tim.Bunce@ig.co.uk> and the perl5-porters mailing list. |
|