pileofrogs has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to use Sys::Syslog to log an emergency condition, but LOG_EMERG,"emergency","emerg" or even '0' doesn't work.
I'm on linux.
E.G.
use Sys::Syslog qw(:standard :macros); Sys::Syslog::syslog(LOG_EMERG,"%s","Foo");
produces this error:
syslog: invalid level/facility: 0 at ./test.pl line 11
I've tried lots of other log levels, like LOG_ALERT and LOG_NOTICE, and they work fine.
I can use the command line "logger" tool like this:
logger -p 0 -t test "Foo"
And it works fine.
Does anyone know what's going on here?
Thanks!
--Pileofrogs
Update: openlog() doesn't help.. see below
Another Update: I'm a total dufus. I have an old version of Sys::Syslog.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sys::Syslog and LOG_EMERG
by Maddingue (Sexton) on Aug 12, 2006 at 00:33 UTC | |
|
Re: Sys::Syslog and LOG_EMERG
by Crackers2 (Parson) on Aug 11, 2006 at 23:04 UTC | |
by pileofrogs (Priest) on Aug 11, 2006 at 23:13 UTC | |
by Crackers2 (Parson) on Aug 11, 2006 at 23:17 UTC |