The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Leyland::Logger - Wrapper around Plack's logging middlewares

SYNOPSIS

        # in your app.psgi file
        builder {
                enable 'SomeLoggingMiddleware';
                MyApp->to_app;
        };

        # in your controllers
        $c->log->debug("Some debug message");

DESCRIPTION

This package provides a simple wrapper around the Plack logging middleware used by your application. An object of this class is provided to the context object. Read Leyland::Manual::Logging to learn more.

ATTRIBUTES

logger

An anonymous logging subroutine. This will be the psgix.logger subroutine automatically created by your selected logging middleware. If you haven't selected one, however, this class will create a default one that simply prints messages to standard output or standard error (as appropriate).

METHODS

This class provides methods for the following log levels:

  • trace

  • debug

  • info (with an inform alias)

  • notice

  • warning (with a warn alias)

  • error (with an err alias)

  • critical (with a crit and fatal aliases)

  • alert

  • emergency

All methods take the same parameters: a required $message string, and an optional \%data hash-ref. This is meant to be used by a logger such as Pye, so take a look at it to learn more.

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

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright 2010-2014 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.