Show Mojolicious log messages in browser console (firebug, webkit dev tools)
Perl
Permalink
Failed to load latest commit information.
lib/Mojolicious/Plugin 0.06 build and version bump Jun 8, 2015
t
Changes
Mojolicious-Plugin-ConsoleLogger-0.06.tar.gz 0.06 build and version bump Jun 8, 2015
README.pod
dist.ini 0.06 build and version bump Jun 8, 2015

README.pod

NAME

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

DESCRIPTION

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

* Logging operates only in development mode.

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;

METHODS

Mojolicious::Plugin::ConsoleLogger inherits all methods from Mojolicious::Plugin and implements the following new ones.

register

$plugin->register;

Register condition in Mojolicious application.

SEE ALSO

Mojolicious

DEVELOPMENT

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

VERSION

0.06

CREDITS

Implementation stolen from Plack::Middleware::ConsoleLogger

AUTHORS

Glen Hinkle tempire@cpan.org

Andrew Kirkpatrick

Zhenyi Zhou