home *** CD-ROM | disk | FTP | other *** search
/ CLIX - Fazer Clix Custa Nix / CLIX-CD.cdr / mac / lib / syslog.pl < prev    next >
Text File  |  1997-05-19  |  1KB  |  45 lines

  1. #
  2. # syslog.pl
  3. #
  4. # $Log: syslog.pl,v $
  5. # Revision 1.3  1997/05/19 12:32:06  neeri
  6. # 5.004 merge, round 1
  7. #
  8. # Revision 1.1.1.2  1997/05/17 21:41:42  neeri
  9. # Import of Perl 5.004
  10. #
  11. # Revision 1.2  1997/04/07 20:52:04  neeri
  12. # Synchronized with MacPerl 5.1.4a1
  13. #
  14. # Revision 1.1.1.1  1997/04/06 21:06:30  neeri
  15. # Import of Perl 5.002
  16. #
  17. # tom christiansen <tchrist@convex.com>
  18. # modified to use sockets by Larry Wall <lwall@jpl-devvax.jpl.nasa.gov>
  19. # NOTE: openlog now takes three arguments, just like openlog(3)
  20. #
  21. # call syslog() with a string priority and a list of printf() args
  22. # like syslog(3)
  23. #
  24. #  usage: require 'syslog.pl';
  25. #
  26. #  then (put these all in a script to test function)
  27. #        
  28. #
  29. #    do openlog($program,'cons,pid','user');
  30. #    do syslog('info','this is another test');
  31. #    do syslog('mail|warning','this is a better test: %d', time);
  32. #    do closelog();
  33. #    
  34. #    do syslog('debug','this is the last test');
  35. #    do openlog("$program $$",'ndelay','user');
  36. #    do syslog('notice','fooprogram: this is really done');
  37. #
  38. #    $! = 55;
  39. #    do syslog('info','problem was %m'); # %m == $! in syslog(3)
  40.  
  41. use Sys::Syslog;
  42.  
  43. 1;
  44.