NAME
Mojo::Log::More - Mojo::Log with More details
SYNOPSIS
use Mojo::Log::More;
# Constructor is identical to Mojo::Log
my $log = Mojo::Log::More->new;
# Replace the default log in a Mojolicious::Lite application
app->log($log);
# Output: 2015-02-20T23:30:53 filename.pl:13 INFO> something happened...
app->log->info("something happened...");
# Create a wrapper function
sub debug {
local Mojo::Log::More::caller_depth += 1;
$log->debug(@_);
}
DESCRIPTION
This module is a small wrapper around Mojo::Log which allows you to log caller()
information with your log messages automatically. You do not need to use big logging systems like Log::Dispatch or Log::Log4perl to get this feature anymore.
format
arguments
The format
method receives the same arguments as in Mojo::Log, but with one more argument at the end: an arrayref containing the result of caller()
. You must pop
it before accessing the log messages.
This modules includes its own format
method wich uses the caller
arguments, in particular the source filename and line number. It also prints the date in a more compact format (ISO 8601).
BUGS
Please report any bugs or feature requests at https://github.com/oliwer/mojo-log-more/issues
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Mojo::Log::More
You can also look for information at:
RT: CPAN's request tracker (please use Github instead)
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
AUTHOR
Olivier Duclos, <odc at cpan.org>
LICENSE
Copyright 2015 Olivier Duclos.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.