doon
doon

Reputation: 2361

Sys::Syslog fails with invalid log level/ facility 0 when using LOG_EMERG

The code below is failing for LOG_EMERG. If I use any other level eg. LOG_ALERT this works without problems. Syslog documentation implies that this should work.

use strict;
use warnings;

require Sys::Syslog;
use Sys::Syslog qw(:standard :macros);
eval{Sys::Syslog::openlog('NAME', 'ndelay', 'local0')};
Sys::Syslog::syslog(Sys::Syslog::LOG_EMERG,"Message")

Upvotes: 1

Views: 923

Answers (1)

Richard
Richard

Reputation: 3100

Perhaps a version issue: Latest version is currently at 0.29.

to see what version your using try:

perl -e "use Sys::Syslog; print $Sys::Syslog::VERSION;"

Upvotes: 2

Related Questions