NAME
Log::Any::Adapter::Mojo
SYNOPSIS
use Mojo::Log;
use Log::Any::Adapter;
Log::Any::Adapter->set('Mojo', logger => Mojo::Log->new);
Mojolicious app:
use Mojo::Base 'Mojolicious';
use Log::Any::Adapter;
sub startup {
my $self = shift;
Log::Any::Adapter->set('Mojo', logger => $self->app->log);
}
Mojolicious::Lite app:
use Mojolicious::Lite;
use Log::Any::Adapter;
Log::Any::Adapter->set('Mojo', logger => app->log);
DESCRIPTION
This Log::Any adapter uses Mojo::Log for logging. Mojo::Log must be initialized before calling set. The parameter logger must be used to pass in the logging object.
LOG LEVEL TRANSLATION
Log levels are translated from Log::Any to Mojo::Log as follows:
trace -> debug
notice -> info
warning -> warn
critical -> fatal
alert -> fatal
emergency -> fatal
SEE ALSO
Log::Any, Log::Any::Adapter, Mojo::Log
AUTHOR
Henry Tang
COPYRIGHT & LICENSE
Copyright (C) 2011 Henry Tang
Log::Any::Adapter::Mojo is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.