NAME
Amon2::Plugin::Web::ChromeLogger - The Chrome Logger Plugin for Amon2
SYNOPSIS
in your app
__PACKAGE__->load_plugins('Web::ChromeLogger');
then in a controller
$c->chrome('aloha!');
or to access raw Web::ChromeLogger
instance.
$c->chrome_logger->warn('mahalo!');
DESCRIPTION
Amon2::Plugin::Web::ChromeLogger is the Chrome Plugin for Amon2.
See Web::ChromeLogger, http://craig.is/writing/chrome-logger for detail
This plugin added below methods for context($c) in Amon2.
chrome($log_message)
To put info log to chrome console.
$c->chrome('mahalo!');
chrome_logger
To get Web::ChromeLogger
instance.
$c->chrome_logger->info('kai!');
$c->chrome_logger->warn('nalu!');
NOTE that this plugin is disabled under PLACK_ENV:production environment by default. If you want to enable this plugin under production environment, you should set TRUE value to the enable_in_production
option.
METHODS
init
initialized this plugin
PLUGIN OPTION
disabled
If you set TRUE value to this option, then the plugin will be disabled.
enable_in_production
To set TRUE value to this option, then the plugin will be enabled even if environment is under PLACK_ENV:production. By default, this plugin is disabled under PLACK_ENV:production environment.
json_encoder
You can pass json_encoder
to WEB::ChromeLogger.
REPOSITORY
Amon2::Plugin::Web::ChromeLogger is hosted on github <http://github.com/bayashi/Amon2-Plugin-Web-ChromeLogger>
Welcome your patches and issues :D
AUTHOR
Dai Okabayashi <bayashi@cpan.org>
SEE ALSO
LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.