The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Toadfarm::Plugin::AccessLog - Log requests

SYNOPSIS

#!/usr/bin/env perl
use Toadfarm -init;
# mount applications, set up logging, ...
plugin "Toadfarm::Plugin::AccessLog";
start;

DESCRIPTION

This module will log the request with "info" log level. The log format is subject for change. For now it is:

$remote_address $http_method $url $status_code
1.2.3.4 GET http://localhost/favicon.ico 200

See also Mojolicious::Plugin::AccessLog if you think this plugin is too limiting.

METHODS

register

Register an "around_dispatch" hook which will log the request.

AUTHOR

Jan Henning Thorsen - jhthorsen@cpan.org