home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-07-11 | 811 b | 33 lines | [TEXT/MPS ] |
- #
- # syslog.pl
- #
- # $Log: syslog.pl,v $
- #
- # tom christiansen <tchrist@convex.com>
- # modified to use sockets by Larry Wall <lwall@jpl-devvax.jpl.nasa.gov>
- # NOTE: openlog now takes three arguments, just like openlog(3)
- #
- # call syslog() with a string priority and a list of printf() args
- # like syslog(3)
- #
- # usage: require 'syslog.pl';
- #
- # then (put these all in a script to test function)
- #
- #
- # do openlog($program,'cons,pid','user');
- # do syslog('info','this is another test');
- # do syslog('mail|warning','this is a better test: %d', time);
- # do closelog();
- #
- # do syslog('debug','this is the last test');
- # do openlog("$program $$",'ndelay','user');
- # do syslog('notice','fooprogram: this is really done');
- #
- # $! = 55;
- # do syslog('info','problem was %m'); # %m == $! in syslog(3)
-
- use Sys::Syslog;
-
- 1;
-