Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


When I upgraded perl 8.8.0 (Sys::Syslog 0.3) to perl 8.8.8 (Sys::Syslog 0.13)
on my Solaris 9 box, the hostname in the syslog entries changed from
"" (i.e. the FQDN) to "localhost".  I assume that's because
these lines were removed from connect_udp() in Sys::Syslog 0.3:

    unless ($host) {
        require Sys::Hostname;
        my($host_uniq) = Sys::Hostname::hostname();
        ($host) = $host_uniq =~ /([A-Za-z0-9_.-]+)/; # allow FQDN (inc _)

Was this the desired effect?  What was the reason for this change?
I much prefer the old behavior.  Is the some way to get it back, short
of modifying Sys::Syslog or wrapping each call to syslog() with

    $Sys::Syslog::host = hostname();

in all my applications?


Site Timeline