Mojolicious::Plugin::ChromeLogger - Pushes Mojolicious logs, stash, session, config to Google Chrome console
Mojolicious::Plugin::ChromeLogger pushes Mojolicious log messages, stash, session and config to Google Chrome console. Works with all types of responses(including JSON). To view logs in Google Chrome you should install ChromeLogger extenstion. Logging works only in development mode.
See details here http://craig.is/writing/chrome-logger
use Mojolicious::Lite; plugin 'ChromeLogger'; # or with options - plugin 'ChromeLogger' => {show_config => 1}; get '/' => sub { my $self = shift; app->log->debug('Some debug here'); app->log->info('Some info here'); app->log->warn('Some warn here'); app->log->error('Some error here'); app->log->fatal('Some fatal here'); $self->render( text => 'Open Google Chrome console' ); }; app->start;
show_config
push config to ChromeLogger (default 0)
By default we do not show config. It is usually static and can contain confidential data.
show_stash
push stash to ChromeLogger (default 1)
show_session
push session to ChromeLogger (default 1)
Mojolicious::Plugin::ConsoleLogger
https://github.com/koorchik/Mojolicious-Plugin-ChromeLogger
Inspired by Mojolicious::Plugin::ConsoleLogger
Viktor Turskyi koorchik@cpan.org
To install Mojolicious::Plugin::ChromeLogger, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::ChromeLogger
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::ChromeLogger
For more information on module installation, please visit the detailed CPAN module installation guide.