Description of Problem: The Sys::Syslog modules does not produce any output to syslog Version-Release number of selected component (if applicable): perl-5.6.1-34.99.6 How Reproducible: Always Steps to Reproduce: 1. Run attached script 2. Look in /var/log/messages Actual Results: Nothing Expected Results: Log message in /var/log/messages Additional Information: This is a major issue for software using Sys::Syslog as it will cause failure and diagnostic messages to be silently lost.
Created attachment 63004 [details] Example script
From "perldoc Sys::Syslog": setlogsock $sock_type (added in 5.004_02) Sets the socket type to be used for the next call to "openlog()" or "syslog()" and returns TRUE on success, undef on failure. A value of 'unix' will connect to the UNIX domain socket returned by the "_PATH_LOG" macro (if you sys- tem defines it) in syslog.h. A value of 'inet' will connect to an INET socket returned by getservbyname(). If "_PATH_LOG" is unavailable or if getservbyname() fails, returns undef. Any other value croaks. The default is for the INET socket to be used. So, you need a setlogsock('unix'); in your program, and it will work. Alternatively, you can enable network logging via starting syslogd with the -r switch, which can be added to /etc/sysconfig/syslog's SYSLOGD_OPTIONS setting, followed by restarting the syslog service.