NAME

Leyland::Logger::LogHandler - Use Log::Handler as your app's logger

VERSION

version 0.001005

SYNOPSIS

# in the config hash-ref of app.psgi:
my $config = {
	...
	logger => {
		class => 'LogHandler',
		opts => {
			outputs => [
				file => {
					filename => "myapp.$ENV{PLACK_ENV}.log",
					minlevel => 0,
					maxlevel => 8,
					utf8 => 1,
				},
				screen => {
					log_to   => "STDERR",
					minlevel => 0,
					maxlevel => 8,
				},
			]
		}
	},
	...
};

DESCRIPTION

This module provides Leyland applications with logging capabilities from Log::Handler. To use Log::Handler 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

Leyland::Logger

ATTRIBUTES

obj

The Log::Handler object used.

OBJECT METHODS

init( \%opts )

Initializes the Log::Handler 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::LogHandler

You can also look for information at:

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.