Apache-LogFormat-Compiler
view release on metacpan or search on metacpan
- add docs abount POSIX::strftime::Compiler
- non trial release
0.24 2014-01-27T03:12:16Z
- [TRIAL] switch to using POSIX::strftime::Compiler
0.23 2014-01-16T15:53:09Z
- fixed POSIX::setlocale fails on system without locales (Android) #6 (Thank you dex4er)
0.22 2014-01-08T00:25:14Z
- skip tz test on Windows.
0.21 2014-01-07T13:43:29Z
- requires perl v5.8.4 (Thank you dex4er)
- skip tz test on Cygwin.
my $reqtime = int(Time::HiRes::tv_interval($t0) * 1_000_000);
$env->{psgi.error}->print($log_handler->log_line(
$env,$res,6,$reqtime, $t0->[0]));
}
};
$app
};
# ABOUT POSIX::strftime::Compiler
This module uses [POSIX::strftime::Compiler](https://metacpan.org/pod/POSIX%3A%3Astrftime%3A%3ACompiler) for generate datetime string. POSIX::strftime::Compiler provides GNU C library compatible strftime(3). But this module will not affected by the s...
# ADD CUSTOM FORMAT STRING
Apache::LogFormat::Compiler allows one to add a custom format string
my $log_handler = Apache::LogFormat::Compiler->new(
'%z %{HTTP_X_FORWARDED_FOR|REMOTE_ADDR}Z',
char_handlers => +{
'z' => sub {
my ($env,$req) = @_;
lib/Apache/LogFormat/Compiler.pm view on Meta::CPAN
$env,$res,6,$reqtime, $t0->[0]));
}
};
$app
};
=back
=head1 ABOUT POSIX::strftime::Compiler
This module uses L<POSIX::strftime::Compiler> for generate datetime string. POSIX::strftime::Compiler provides GNU C library compatible strftime(3). But this module will not affected by the system locale. This feature is useful when you want to write...
=head1 ADD CUSTOM FORMAT STRING
Apache::LogFormat::Compiler allows one to add a custom format string
my $log_handler = Apache::LogFormat::Compiler->new(
'%z %{HTTP_X_FORWARDED_FOR|REMOTE_ADDR}Z',
char_handlers => +{
'z' => sub {
my ($env,$req) = @_;
( run in 0.857 second using v1.01-cache-2.11-cpan-ceb78f64989 )