summaryrefslogtreecommitdiff
path: root/ext/Sys
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-09-05 20:34:15 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-09-05 20:34:15 +0000
commit3d256c0f6af54af3995fa6abb8d11a7c054803e3 (patch)
treef941e90496720a557d8f54cf717a1d09ea0cf3d7 /ext/Sys
parentfcaa57e7f91cda946b2f56c966b0368e91277889 (diff)
downloadperl-3d256c0f6af54af3995fa6abb8d11a7c054803e3.tar.gz
Musty corners of Syslog.pm.
p4raw-id: //depot/perl@21052
Diffstat (limited to 'ext/Sys')
-rw-r--r--ext/Sys/Syslog/Syslog.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/Sys/Syslog/Syslog.pm b/ext/Sys/Syslog/Syslog.pm
index 03adde6363..a63c8bc3ce 100644
--- a/ext/Sys/Syslog/Syslog.pm
+++ b/ext/Sys/Syslog/Syslog.pm
@@ -36,7 +36,7 @@ Sys::Syslog, openlog, closelog, setlogmask, syslog - Perl interface to the UNIX
use Sys::Syslog qw(:DEFAULT setlogsock); # default set, plus setlogsock
setlogsock $sock_type;
- openlog $ident, $logopt, $facility;
+ openlog $ident, $logopt, $facility; # don't forget this
syslog $priority, $format, @args;
$oldmask = setlogmask $mask_priority;
closelog;
@@ -57,7 +57,11 @@ I<$ident> is prepended to every message. I<$logopt> contains zero or
more of the words I<pid>, I<ndelay>, I<nowait>. The cons option is
ignored, since the failover mechanism will drop down to the console
automatically if all other media fail. I<$facility> specifies the
-part of the system
+part of the system to report about, for example LOG_USER or LOG_LOCAL0:
+see your C<syslog(3)> documentation for the facilities available in
+your system.
+
+B<You should use openlog() before calling syslog().>
=item syslog $priority, $format, @args
@@ -65,6 +69,10 @@ If I<$priority> permits, logs I<($format, @args)>
printed as by C<printf(3V)>, with the addition that I<%m>
is replaced with C<"$!"> (the latest error message).
+If you didn't use openlog() before using syslog(), syslog will try to
+guess the I<$ident> by extracting the shortest prefix of I<$format>
+that ends in a ":".
+
=item setlogmask $mask_priority
Sets log mask I<$mask_priority> and returns the old mask.