| 1 | package Mojolicious::Plugin::Log::Access; | ||
| 2 | 2 | ▶ | use Mojolicious::Plugin -base; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | 2 | our $VERSION = 0.041; | |
| 5 | |||
| 6 | 1 | ▶ | sub register { |
|
Subroutine
register: called CC=1 SCAR=0.0
Pod
documented
| |||
| 7 | 1 | my ($self, $app) = @_; | |
| 8 | 4 | ▶ | $app->hook(after_dispatch => sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 9 | 4 | my $c = shift; | |
| 10 | 4 | $app->log->info(sprintf '%s "%s" %s', $c->tx->remote_address, | |
| 11 | $c->req->url->to_abs->path_query, $c->res->code); | ||
| 12 | 1 | }); | |
| 13 | } | ||
| 14 | |||
| 15 | 2 | 1; | |
| 16 | __END__ | ||