Amon2::Plugin::Web::ChromeLogger - The Chrome Logger Plugin for Amon2
in your app
__PACKAGE__->load_plugins('Web::ChromeLogger');
then in a controller
$c->chrome('aloha!');
or to access raw Web::ChromeLogger instance.
Web::ChromeLogger
$c->chrome_logger->warn('mahalo!');
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.
To put info log to chrome console.
$c->chrome('mahalo!');
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.
enable_in_production
initialized this plugin
If you set TRUE value to this option, then the plugin will be disabled.
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.
You can pass json_encoder to WEB::ChromeLogger.
json_encoder
Amon2::Plugin::Web::ChromeLogger is hosted on github <http://github.com/bayashi/Amon2-Plugin-Web-ChromeLogger>
Welcome your patches and issues :D
Dai Okabayashi <bayashi@cpan.org>
Amon2, Web::ChromeLogger
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install Amon2::Plugin::Web::ChromeLogger, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Amon2::Plugin::Web::ChromeLogger
CPAN shell
perl -MCPAN -e shell install Amon2::Plugin::Web::ChromeLogger
For more information on module installation, please visit the detailed CPAN module installation guide.