NAME
Posy::Plugin::Log4perl - Dispatch debug messages with Log::Log4perl
VERSION
This document describes Posy::Plugin::Log4perl version 0.2.
SYNOPSIS
@plugins = qw(
Posy::Core
Posy::Plugin::Log4perl
);
Configure $config_dir/plugins/log4perl:
log4perl.logger.posy.plugin.log4perl = DEBUG, SCREEN
log4perl.appender.SCREEN = Log::Log4perl::Appender::Screen
log4perl.appender.SCREEN.stderr = 1
log4perl.appender.SCREEN.layout = PatternLayout
log4perl.appender.SCREEN.layout.ConversionPattern = [%r] %P %p %c - %m%n
DESCRIPTION
This module overrides Posy's default debug() method with a version that dispatches debug messages with Log::Log4perl. This module can be used in a compatible manner with the core debug() method by sending all messages to STDERR or one can choose to log in a completely incompatible manner.
Upon initialization, this module creations a Log4perl logger named posy.plugin.log4perl.
The core Posy debug() does not support logging levels directly compatible with those understood by Log4perl. As such, this module (crudely) wraps Posy's integer-based debug levels to Log4perl's five levels.
Posy 0 maps to Log4perl FATAL
Posy 1 maps to Log4perl ERROR
Posy 2 maps to Log4perl WARN
Posy 3 maps to Log4perl INFO
All other Posy levels map to Log4perl DEBUG
INTERFACE
init()
$self->init()
Initialize the Log4perl logger.
debug
$self->debug($level, $message);
Dispatches debug messages to a Log4perl logger.
$level
is an integer value. The higher the level the more verbose the logging.
SEE ALSO
BUGS AND LIMITATIONS
Please report any bugs or feature requests to bug-Posy-Plugin-Log4perl@rt.cpan.org
or through the web interface at http://rt.cpan.org.
AUTHOR
blair christensen., <blair@devclue.com>
<http://devclue.com/blog/code/posy/Posy::Plugin::Log4perl/>
COPYRIGHT AND LICENSE
Copyright 2005 by blair christensen.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 56:
=over should be: '=over' or '=over positive_number'
- Around line 68:
You forgot a '=back' before '=head1'