NAME

Mojolicious::Plugin::ParamLogger - Log request parameters

SYNOPSIS

# Mojolicious
$self->plugin('ParamLogger', %options)

# Mojolicious::Lite
plugin 'ParamLogger', %options;

DESCRIPTION

This module automatically logs request parameters while in development mode. See "OPTIONS" for details.

Mojolicious doesn't log request parameters. Of course -depending on your setup- they may be logged elsewhere but, when in development, I use morbo and morbo doesn't log them (same goes for hypnotoad).

OPTIONS

filter

$self->plugin('ParamLogger', filter => 'authtoken')
$self->plugin('ParamLogger', filter => [ qw{nome senha} ])

Parmeter values to exclude from the log. Defaults to 'password'.

level

$self->plugin('ParamLogger', level => 'info')

Log the request parameters at the given log level. Defaults to 'info' in production, 'debug' everywhere else. See "level" in Mojo::Log for a list of log levels.

mode

$self->plugin('ParamLogger', production => 1)

Turn on parameter logging for the given mode. By default parameters will only be logged when in development mode.

SEE ALSO

Mojolicious, Mojo::Log

LICENSE

Copyright (c) 2012 Skye Shaw.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.