summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/ext/Sys/Syslog/Syslog.pm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/ext/Sys/Syslog/Syslog.pm')
-rw-r--r--gnu/usr.bin/perl/ext/Sys/Syslog/Syslog.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/gnu/usr.bin/perl/ext/Sys/Syslog/Syslog.pm b/gnu/usr.bin/perl/ext/Sys/Syslog/Syslog.pm
index 244157f755e..551a885eb89 100644
--- a/gnu/usr.bin/perl/ext/Sys/Syslog/Syslog.pm
+++ b/gnu/usr.bin/perl/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)>