Bug 67607 - Sys::Syslog doesn't
Sys::Syslog doesn't
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Chip Turner
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2002-06-27 23:49 EDT by Damien Miller
Modified: 2007-04-18 12:43 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-06-27 23:50:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Example script (113 bytes, text/plain)
2002-06-27 23:50 EDT, Damien Miller
no flags Details

  None (edit)
Description Damien Miller 2002-06-27 23:49:09 EDT
Description of Problem:

The Sys::Syslog modules does not produce any output to syslog

Version-Release number of selected component (if applicable):


How Reproducible:


Steps to Reproduce:
1. Run attached script
2. Look in /var/log/messages

Actual Results:


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.
Comment 1 Damien Miller 2002-06-27 23:50:13 EDT
Created attachment 63004 [details]
Example script
Comment 2 Chip Turner 2002-06-28 12:38:34 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.