Mojolicious::Plugin::ParamLogger - Log request parameters
# Mojolicious
$self->plugin('ParamLogger', %options)
# Mojolicious::Lite
plugin 'ParamLogger', %options;
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
).
$self->plugin('ParamLogger', filter => 'authtoken')
$self->plugin('ParamLogger', filter => [ qw{nome senha} ])
Parmeter values to exclude from the log. Defaults to 'password'
.
$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.
$self->plugin('ParamLogger', production => 1)
Turn on parameter logging for the given mode. By default parameters will only be logged when in development mode.
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.