Group
Extension

Matches 1

Mojolicious-Plugin-ConsoleLogger ( T/TE/TEMPIRE/Mojolicious-Plugin-ConsoleLogger-0.06.tar.gz, TEMPIRE, 2015; MetaCPAN )
Mojolicious-Plugin-ConsoleLogger/lib/Mojolicious/Plugin/ConsoleLogger.pm ( view source; MetaCPAN )
onsoleLogger;

use Mojo::Base 'Mojolicious::Plugin';
use Mojo::ByteStream;
use Mojo::JSON qw(decode_json encode_json);

our $VERSION = 0.06;

has logs => sub {
  return {
    fatal => [],
    info  =>
   my $self = shift;
      # Patched Nov 23, 2014 to work with JSON
      return if $self->res->headers->content_type eq 'application/json';
      my $logs = $plugin->logs;

      # Leave static conte
 }
  );
}

sub _format_msg {
  my $msg = shift;

  return ref($msg)
    ? "console.log(" . encode_json($msg) . "); "
    : "console.log(" . Mojo::ByteStream->new($msg)->quote . "); ";
}

1;

=head1 NA

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.