Apache-LogFormat-Compiler

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

Compile a log format string to perl-code. For faster generation of access\_log lines.

# METHOD

- new($fmt:String)

    Takes a format string (or a preset template `combined` or `custom`)
    to specify the log format. This module implements a subset of
    [Apache's LogFormat templates](http://httpd.apache.org/docs/2.0/mod/mod_log_config.html):

        %%    a percent sign
        %h    REMOTE_ADDR from the PSGI environment, or -
        %l    remote logname not implemented (currently always -)
        %u    REMOTE_USER from the PSGI environment, or -
        %t    [local timestamp, in default format]
        %r    REQUEST_METHOD, REQUEST_URI and SERVER_PROTOCOL from the PSGI environment
        %s    the HTTP status code of the response
        %b    content length of the response
        %T    custom field for handling times in subclasses
        %D    custom field for handling sub-second times in subclasses
        %v    SERVER_NAME from the PSGI environment, or -

lib/Apache/LogFormat/Compiler.pm  view on Meta::CPAN

=head1 METHOD

=over 4

=item new($fmt:String)

Takes a format string (or a preset template C<combined> or C<custom>)
to specify the log format. This module implements a subset of
L<Apache's LogFormat templates|http://httpd.apache.org/docs/2.0/mod/mod_log_config.html>:

   %%    a percent sign
   %h    REMOTE_ADDR from the PSGI environment, or -
   %l    remote logname not implemented (currently always -)
   %u    REMOTE_USER from the PSGI environment, or -
   %t    [local timestamp, in default format]
   %r    REQUEST_METHOD, REQUEST_URI and SERVER_PROTOCOL from the PSGI environment
   %s    the HTTP status code of the response
   %b    content length of the response
   %T    custom field for handling times in subclasses
   %D    custom field for handling sub-second times in subclasses
   %v    SERVER_NAME from the PSGI environment, or -



( run in 0.337 second using v1.01-cache-2.11-cpan-10c994e2082 )