Bug 67607

Summary: Sys::Syslog doesn't
Product: [Retired] Red Hat Linux Reporter: Damien Miller <djm>
Component: perlAssignee: Chip Turner <cturner>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-06-28 03:50:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Example script none

Description Damien Miller 2002-06-28 03:49:09 UTC
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.

Comment 1 Damien Miller 2002-06-28 03:50:13 UTC
Created attachment 63004 [details]
Example script

Comment 2 Chip Turner 2002-06-28 16:38:34 UTC
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.