use Sys::Syslog;
openlog $ident, $logopt, $facility;
- syslog $priority, $mask, $format, @args;
+ syslog $priority, $format, @args;
$oldmask = setlogmask $mask_priority;
closelog;
I<$logopt> contains one or more of the words I<pid>, I<ndelay>, I<cons>, I<nowait>.
I<$facility> specifies the part of the system
-=item syslog $priority, $mask, $format, @args
+=item syslog $priority, $format, @args
-If I<$priority> and I<$mask> permit, logs I<($format, @args)>
+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).
=cut
-$host = hostname() unless $host; # set $Syslog::host to change
-
require 'syslog.ph';
$maskpri = &LOG_UPTO(&LOG_DEBUG);
sub connect {
unless ($host) {
require Sys::Hostname;
- $host = Sys::Hostname::hostname();
+ my($host_uniq) = Sys::Hostname::hostname();
+ ($host) = $host_uniq =~ /(\w+)/;
}
my $udp = getprotobyname('udp');
my $syslog = getservbyname('syslog','udp');