diff options
author | Jay Hannah <jhannah@omnihotels.com> | 2004-09-15 09:51:42 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-09-30 15:41:40 +0000 |
commit | 476b65d99f3d74dcdd84fe0193db04f9db2c3d52 (patch) | |
tree | 66540cc77afc3374314ec0d68e4f62a3b7d223f7 /ext/Sys/Syslog | |
parent | 47cc46ee1b0f541fba01adac0a6a3dd526924313 (diff) | |
download | perl-476b65d99f3d74dcdd84fe0193db04f9db2c3d52.tar.gz |
[patch] Sys::Syslog POD - $Sys::Syslog::host
From: "Jay Hannah" <jhannah@omnihotels.com>
Message-ID: <002001c49b5d$6d0d79c0$4722000a@omarests2>
p4raw-id: //depot/perl@23341
Diffstat (limited to 'ext/Sys/Syslog')
-rw-r--r-- | ext/Sys/Syslog/Syslog.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/Sys/Syslog/Syslog.pm b/ext/Sys/Syslog/Syslog.pm index 244157f755..551a885eb8 100644 --- a/ext/Sys/Syslog/Syslog.pm +++ b/ext/Sys/Syslog/Syslog.pm @@ -128,6 +128,12 @@ Note that C<openlog> now takes three arguments, just like C<openlog(3)>. $! = 55; syslog('info', 'problem was %m'); # %m == $! in syslog(3) + # Log to UDP port on $remotehost instead of logging locally + setlogsock('udp'); + $Sys::Syslog::host = $remotehost; + openlog($program, 'ndelay', 'user'); + syslog('info', 'something happened over here'); + =head1 SEE ALSO L<syslog(3)> |