I'm trying to convert some #!/bin/sh scripts into #!/usr/bin/perl scripts, and I'm not having any luck.
I've tried following the examples in "perldoc Sys::Syslog", but for some reason they're not working. My example script (below) produces no output either to the terminal I run it in, or to /var/log/messages (which I'm watching via a 'tail -f').
OS is RH Linux 7.0, Perl is 5.6.0. Sys::Syslog version is 0.1, I think.
Sample script:
#!/usr/bin/perl -w $|++; use strict; use Sys::Syslog; # For openlog() call my $ident = 'somefunprocessname'; my $logopt = 'pid'; my $facility = 'user'; # For syslog() call my $priority = 'notice'; my $mask = ''; my $format = ''; my @args = '-ip user.notice -t somefunprocessname'; openlog($ident, $logopt, $facility); syslog($priority, 'asdfasdf'); closelog();
Any and all help is appreciated. TIA mucho...
-YendorMike
In reply to Sys::Syslog produces no output... by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |