Log-Syslog-Fast

 view release on metacpan or  search on metacpan

lib/Log/Syslog/Fast/PP.pm  view on Meta::CPAN

        LOG_RFC3164, # format
    ], $class;

    $self->update_prefix(time());

    eval { $self->set_receiver($proto, $hostname, $port) };
    die "Error in ->new: $@" if $@;
    return $self;
}

sub update_prefix {
    my $self = shift;
    my $t = shift;

    $self->[LAST_TIME] = $t;

    my $timestr = strftime("%h %e %T", localtime $t);
    if ($self->[FORMAT] == LOG_RFC5424) {
        $timestr = strftime("%Y-%m-%dT%H:%M:%S%z", localtime $t);
        $timestr =~ s/(\d{2})$/:$1/; # see http://tools.ietf.org/html/rfc3339#section-5.6 time-numoffset
    }

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.155 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )