Date: Tue, 20 Feb 2001 22:35:22 -0800 (PST) From: Tony Fleisher <takhus@takhus.mind.net> To: lists <lists@lists.grot.org> Cc: freebsd-stable@FreeBSD.ORG Subject: Re: syslog changes in 4.2-stable? Message-ID: <Pine.BSF.4.21.0102202229001.74542-100000@takhus.dyn.mind.net> In-Reply-To: <20010220222603.A36904@mighty.grot.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 20 Feb 2001, lists wrote:
> I have some odd syslog behaviour wrt the perl Sys::Syslog module. Since I can
> only reproduce the problem on 4.2-STABLE boxes, I think this is the right
> place to bring it up.
>
> I have an exceedingly simple perl script that simulates the behaviour of the
> command:
>
> logger -p 'user.crit' "this is another test"
>
> on all machines I have tested the perl script, the above command has been
> verified to work from the local command line, so I know that syslog.conf and
> the syslogd options are "sane".
>
> ----------------------------------------
> #!/usr/bin/perl -w
> use strict;
> local $| = 1;
>
> use Sys::Syslog;
> openlog('test', 'cons,pid', 'user');
> syslog('crit', "this is another test");
> closelog();
> ----------------------------------------
>
> the above perl snippet works under:
>
> SunOS 5.7
> This is perl, version 5.004_04 built for sun4-solaris
>
> FreeBSD 3.3-RELEASE
> This is perl, version 5.005_03 built for i386-freebsd
>
> but does NOT work under any of 4 machines all running:
>
> FreeBSD 4.2-STABLE
> This is perl, version 5.005_03 built for i386-freebsd
>
> all CVSup'd this past week.
>
I happened to run into this exact problem sometime last week and
found that it was fixed by adding:
setlogsock('unix');
>
> I also thought that setting
>
> Sys::Syslog::setlogsock('inet');
>
> explictly might help. It didn't.
>
From the perldoc page:
"The default is for the INET socket to be used."
Hope this helps,
TOny.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0102202229001.74542-100000>
