Beau E. Cox wrote:
Hi -

I'm having trouble logging to syslog on my Linux (Sorcerer)
machine with perl 8.0.2 installed. This script logs nothing:


Should that be 5.8.2?


#!/usr/bin/perl

use strict;
use warnings;
use Sys::Syslog qw(:DEFAULT setlogsock);

setlogsock('unix');
openlog($0, 'cons,pid', 'user');
syslog('err', 'test error msg');
closelog();

Removing the 'setlogsock' doesn't help; still a noop.

Writing the same thing in C using syslog(3) calls, everthing
works.

???


The above works (copied exactly) on my RH 9 box using 5.8.0 default. I am assuming syslogd is running?


You might try catching the error condition of the openlog I *guess* it is the same as a standard open, though the docs do a very poor job of discussing the error handling for the module.

http://danconia.org


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to