tempire / mojolicious-plugin-consolelogger

Show Mojolicious log messages in browser console (firebug, webkit dev tools)
8 stars 5 forks source link

=pod

=head1 NAME

Mojolicious::Plugin::ConsoleLogger - Console logging in your browser

=head1 DESCRIPTION

L pushes Mojolicious session, stash, config, and log messages to the browser's console tool.

=head1 USAGE

use Mojolicious::Lite;

plugin 'ConsoleLogger';

get '/' => sub {

    app->log->debug("Here I am!");
    app->log->error("This is bad");
    app->log->fatal("This is really bad");
    app->log->info("This isn't bad at all");
    app->log->info({json => 'structure'});

    shift->render(text => 'Ahm in ur browzers, logginz ur console');
};

app->start;

=head1 METHODS

L inherits all methods from L and implements the following new ones.

=head2 C

$plugin->register;

Register condition in L application.

=head1 SEE ALSO

L

=head1 DEVELOPMENT

Lhttp://github.com/tempire/mojolicious-plugin-consolelogger

=head1 VERSION

0.06

=head1 CREDITS

Implementation stolen from L

=head1 AUTHORS

Glen Hinkle tempire@cpan.org

Andrew Kirkpatrick

Zhenyi Zhou

=cut