[syslog-ng]syslogging with perl

Bernd Jucknischke bj@de.uu.net
Wed, 14 Feb 2001 09:37:38 +0100


--iVCmgExH7+hIHJ1A
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi all!

  I've just been facing a strange problem. Attached you'll find a perl script.
I've been running this script on different machines with different results
(the path to perl has been adapted, of course):

  machinetype	logging daemon	OS			Perl	result

  pc		syslogd		Debian unstable		5.6	doesn't work
  Sun		syslogd		Solaris 2.6		5.004_4	works
  Sun		syslog-ng	Solaris 2.6		5.004_4	doesn't work

Did anybody ever experience problems like that? I'd say it's perl related, but
I'm not sure; any hint or advice is appreciated.

  TIA,

    Bernd

--iVCmgExH7+hIHJ1A
Content-Type: application/x-perl
Content-Disposition: attachment; filename="logtest.pl"

#! /usr/bin/perl -w

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

setlogsock("inet");
openlog("logtest", "ndelay, pid, nowait", "local3");
#$bla = openlog("logtest", "ndelay", "local3");
#print "$bla\n";
syslog("info", "bla");
#$bla = syslog("info", "bla");
#print "$bla\n";
closelog();
#$bla = closelog();
#print "$bla\n";

exit 0;

--iVCmgExH7+hIHJ1A--