Subject: | Sys::Syslog on Solaris-9 not logging to local0->local7 |
Perl versions 5.8.6, 5.8.7, 5.8.8
Also tried Sys::Syslog version 0.13 directly form cpan.org website.
OS: Solaris 9
Sys::Syslog will not log to any local0-> local7 facility. It defaults
to LOG_USER instead. The messages do go to user.info. I have tried the
example directly out of the documentation and it also fails to log as
requested.
If you take the example from the documentation and convert it to a small
C program, it does behave as expected.
For my application, I need to log to LOG_LOCAL0
cat << \EOF > tst.c
#include <syslog.h>
#include <stdio.h>
main()
{
syslog ( LOG_LOCAL0 | LOG_INFO , "Test Syslog LOG_LOCAL0 | LOG_INFO
from C");
}
EOF
cat << \EOF > tst.pl
#!/usr/local/bin/perl -w
use Sys::Syslog;
syslog("local0|info", "Test Sys::Syslog from info.local0");
EOF
cat << EOF
My entry from C program -> local0.info
May 22 11:27:46 moran a.out[17310]: [ID 632322 local0.info] Test Syslog
LOG_LOCAL0 | LOG_INFO from C
My entry from Sys::Syslog went to user (/var/log/userlog per my syslog.conf)
May 22 11:31:18 moran <134>May 22 11:31:18 Test Sys: :Syslog from
info.local0
EOF