Beau E. Cox wrote:Should that be 5.8.2?> Hi -
> I'm having trouble logging to syslog on my Linux (Sorcerer)
> machine with perl 8.0.2 installed. This script logs nothing:
The above works (copied exactly) on my RH 9 box using 5.8.0 default. I> #!/usr/bin/perl
> use strict;
> use warnings;
> use Sys::Syslog qw(:DEFAULT setlogsock);
> openlog($0, 'cons,pid', 'user');
> syslog('err', 'test error msg');
> Removing the 'setlogsock' doesn't help; still a noop.
> Writing the same thing in C using syslog(3) calls, everthing
am assuming syslogd is running?
You might try catching the error condition of the openlog I *guess* it
is the same as a standard open, though the docs do a very poor job of
discussing the error handling for the module.