NAME
Leyland::Logger::LogDispatch - Use Log::Dispatch as your app's logger
VERSION
version 0.001006
SYNOPSIS
# in the config hash-ref of app.psgi:
my $config = {
...
logger => {
class => 'LogDispatch',
opts => {
outputs => [
[ 'File', min_level => 'debug', filename => "myapp.$ENV{PLACK_ENV}.log", newline => 1 ],
[ 'Screen', min_level => 'warning', newline => 1 ],
],
}
},
...
};
DESCRIPTION
This module provides Leyland applications with logging capabilities from Log::Dispatch. To use Log::Dispatch for logging, your application's config hash-ref (defined in app.psgi
) should have a "logger" key with information on how to create the logger. Look at the "SYNOPSIS" for an example.
CONSUMES
ATTRIBUTES
obj
The Log::Dispatch object used.
OBJECT METHODS
init( \%opts )
Initializes the Log::Dispatch object with options passed from the app's config hash.
log( { level => $level, message => $msg } )
Logs a message of a certain level.
AUTHOR
Ido Perlmuter, <ido at ido50.net>
BUGS
Please report any bugs or feature requests to bug-Leyland at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Leyland. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Leyland::Logger::LogDispatch
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
Copyright 2010-2011 Ido Perlmuter.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.