Copyright (C) 2000-2012 |
Manpages Sys::SyslogSection: Perl Programmers Reference Guide (3perl)Updated: 2001-03-03 Index Return to Main Contents NAMESys::Syslog, openlog, closelog, setlogmask, syslog - Perl interface to the UNIX syslog(3) callsSYNOPSISuse Sys::Syslog; # all except setlogsock, or: use Sys::Syslog qw(:DEFAULT setlogsock); # default set, plus setlogsock setlogsock $sock_type; openlog $ident, $logopt, $facility; syslog $priority, $format, @args; $oldmask = setlogmask $mask_priority; closelog; DESCRIPTIONSys::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:
Note that "openlog" now takes three arguments, just like openlog(3). EXAMPLESopenlog($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) 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. Dependency on syslog.ph replaced with XS code by Tom Hughes <tom@compton.nu>.
IndexThis document was created by man2html, using the manual pages. Time: 02:55:15 GMT, January 21, 2025 |