Subject: | LOG_EMERG unusable |
It seems LOG_EMERG is unusable with Sys::Syslog. Passing LOG_EMERG as
the first argument ($priority) to Sys::Syslog::syslog() causes perl to
croak.
sys/syslog.ph:
eval 'sub LOG_EMERG () {0;}' unless defined(&LOG_EMERG);
Syslog.pm:
199 sub syslog {
200 my $priority = shift;
201 my $mask = shift;
202 my ($message, $buf);
203 my (@words, $num, $numpri, $numfac, $sum);
204 my $failed = undef;
205 my $fail_time = undef;
206 my $error = $!;
207
208 my $facility = $facility; # may need to change temporarily.
209
210 croak "syslog: expecting argument \$priority" unless defined
$priority;
211 croak "syslog: expecting argument \$format" unless defined
$mask;
212
Line 210 croaks since $priority == 0 when LOG_EMERG is passed.