Sys::Syslog

Nick Smith nick.smith67 at googlemail.com
Wed Aug 2 09:53:11 IST 2006


Hi all,

Just upgraded to MS 4.55.9 which included an upgrade of Sys::Syslog
from 0.05 (which was part of the OS's Perl installation) to 0.17

After the upgrade, MS wouldn't log to syslog and neither would the
original MS version (4.54)

I downgraded Sys::Syslog back to 0.05 and it started working again

In the past, I have always had to run syslogd in "remote mode" with a
UDP listener for it to work with 0.05, but 0.17 wouldn't log at all
whether using remote mode or not

This test script worked fine with 0.17 installed:

use strict;
use Sys::Syslog;
openlog("testprog", 'pid, nowait', "local6");
syslog("local6.info", "testing");

After some trial (and mostly) error, I finally discovered that adding
the "ndelay" parameter to MS's openlog statement in Log.pm made it
work:

eval { Sys::Syslog::openlog($name, 'pid, nowait, ndelay', $facility); };

I don't pretend to have any clue what is going on here, I would assume
that 99% of folks don't need to specify ndelay or it would have come
to light previously. However in my case it would seem to be required.
BTW Sys::Syslog 0.17 has the welcome side effect that I no longer need
to run syslogd in UDP "remote mode" for MS to work

Solaris 10 (Intel)
Perl 5.8.4
Logging to facility local6

Anybody have any insight? Any downside to using "ndelay"? If there is
no downside, can the MS distribution be changed to use it?

Thanks

Nick


More information about the MailScanner mailing list