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
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)>
$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";