On Monday 24 November 2003 03:03 pm, david wrote:
> Beau E. Cox wrote:
> > Hi -
> >
> > I'm having trouble logging to syslog on my Linux (Sorcerer)
> > machine with perl 8.0.2 installed. This script logs nothing:
Oops - perl 5.8.2
> > [snipped]
"beefed" up the script to:
#!/usr/bin/perl
use strict;
use warnings;
use Sys::Syslog qw(:DEFAULT setlogsock);
eval { setlogsock('unix'); };
print "eval setlogsock: [EMAIL PROTECTED]" if $@;
eval { openlog($0, 'cons,pid', 'user'); };
print "eval openlog: [EMAIL PROTECTED]" if $@;
eval { syslog('err', 'test error msg'); };
print "eval syslog: [EMAIL PROTECTED]" if $@;
eval { closelog(); };
print "eval closelog: [EMAIL PROTECTED]" if $@;
setlogsock('unix') || die "err setlogsock: $!\n";
openlog($0, 'cons,pid', 'user') || die "err logopen: $!\n";
syslog('err', 'test error msg') || die "err syslog: $!\n";
closelog() || die "err closelog: $!\n";
The only output printed is:
err closelog:
which has an empty $! so prob. not an error.
Nothing goes to the log.
> what machine are you running this with? how do you verify that nothing is
> printed? i have no problem doing the following:
>
Running on the local machine; I look in the /var/log/everything/current file
which is where 'everything' is logged - I'm using metalog 0.7. This is where
my test C program sucessfully logs.
Maybe it has something to do with metalog - but everything else is
logging fine...
I'm stumped.
Aloha => Beau;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]