in reply to Sys::Syslog and LOG_EMERG
In short, RTFM...
From the Sys::Syslog POD
=head1 SYNOPSIS use Sys::Syslog; # all except setlogsock( +), or: use Sys::Syslog qw(:DEFAULT setlogsock); # default set, plus setl +ogsock() use Sys::Syslog qw(:standard :macros); # standard functions, pl +us macros setlogsock $sock_type; openlog $ident, $logopt, $facility; # don't forget this syslog $priority, $format, @args; $oldmask = setlogmask $mask_priority; closelog;
Note the line marked "don't forget this"
Basically, when logging to syslog you need both a priority and a facility. The command-line logger tool defaults to "user" as facility, but Sys::Syslog apparently does not, so you need the openlog call to set the facility.
Update: Actually adding openlog doesn't seem to fix it, so that wasn't much help I'm afraid.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sys::Syslog and LOG_EMERG
by pileofrogs (Priest) on Aug 11, 2006 at 23:13 UTC | |
by Crackers2 (Parson) on Aug 11, 2006 at 23:17 UTC |