summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/Sys/Syslog/Syslog.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/Sys/Syslog/Syslog.pm b/ext/Sys/Syslog/Syslog.pm
index c56d37cb70..4f06357d35 100644
--- a/ext/Sys/Syslog/Syslog.pm
+++ b/ext/Sys/Syslog/Syslog.pm
@@ -7,7 +7,7 @@ use strict;
our @ISA = qw(Exporter);
our @EXPORT = qw(openlog closelog setlogmask syslog);
our @EXPORT_OK = qw(setlogsock);
-our $VERSION = '0.07';
+our $VERSION = '0.08';
# it would be nice to try stream/unix first, since that will be
# most efficient. However streams are dodgy - see _syslog_send_stream
@@ -65,6 +65,8 @@ daemon.
B<You should use openlog() before calling syslog().>
+=item syslog $priority, $message
+
=item syslog $priority, $format, @args
If I<$priority> permits, logs I<($format, @args)>
@@ -320,7 +322,7 @@ sub syslog {
$mask =~ s/(?<!%)%m/$!/g;
$mask .= "\n" unless $mask =~ /\n$/;
- $message = sprintf ($mask, @_);
+ $message = @_ ? sprintf($mask, @_) : $mask;
$sum = $numpri + $numfac;
my $buf = "<$sum>$whoami: $message\0";