develooper Front page | perl.beginners | Postings from April 2002

Sys::Syslog

Thread Next
From:
Rus Foster
Date:
April 29, 2002 06:07
Subject:
Sys::Syslog
Message ID:
20020429140417.R53717-100000@freebsd.rf0.com
Hi all,
 I've wonder if you get help me with a problem I'm having. ATM I've
managed to log to my local syslog using the following code

#!/usr/sbin/perl

use Sys::Syslog qw();

$user = $ENV{'USER'};
openlog($0,'','user');
syslog('info', "$user logged this comment");
closelog;

What I would however like to do is log to a remote machine without having
to put something like

*.info 	@loghost

in my /etc/syslogd.conf

Is this possible? Looking over the man page it doesn't seem so but I might
be missing something

Rgds

Rus


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About