in reply to Re^2: Sys::Syslog and LOG_EMERG
in thread Sys::Syslog and LOG_EMERG
Looks like a real bug in Sys::Syslog. Below the code from Syslog.pm around line 632:
if ($_ eq 'kern' || $num <= 0) { croak "syslog: invalid level/facility: $_" }
Changing this to
if ($_ eq 'kern' || $num < 0) { croak "syslog: invalid level/facility: $_" }
makes the code work for me.
Update:Of course that change means you won't get an error message anymore if you forget to specify a priority (e.g. syslog(LOG_USER,"test")). I'm sure someone will come up with the right solution though.
|
|---|