File Coverage

blib/lib/Mojolicious/Plugin/Log/Access.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 1 1 100.0
total 11 11 100.0


line stmt bran cond sub pod time code
1             package Mojolicious::Plugin::Log::Access;
2 2     2   2199 use Mojolicious::Plugin -base;
  2         295  
  2         23  
3              
4             our $VERSION = 0.041;
5              
6             sub register {
7 1     1 1 53 my ($self, $app) = @_;
8             $app->hook(after_dispatch => sub {
9 4     4   37234 my $c = shift;
10 4         15 $app->log->info(sprintf '%s "%s" %s', $c->tx->remote_address,
11             $c->req->url->to_abs->path_query, $c->res->code);
12 1         10 });
13             }
14              
15             1;
16             __END__