NAME

OpenPlugin::Log - Log messages

SYNOPSIS

$OP->log->debug( "The flyswatter is in the corner." );
$OP->log->info(  "Successfully opened file $file." );
$OP->log->warn(  "Watch out for that tree!" );
$OP->log->error( "Cannot find specified file." );
$OP->log->fatal( "Humpty Dumpty had a great fall." );

DESCRIPTION

This logging interface is built on top of Log::Log4perl. It comes with five predefined logging levels, and the ability to dispatch logs to one or more sources.

First, you can configure the logging level in the config file. By default, the logging level is WARN. That means that messages of level WARN, ERROR, and FATAL will be shown. This allows you to control how much logging takes place. Typically, you would just leave the logging level at WARN. But what happens when things aren't working quite right? You can increase the information to be logged by setting the log level to INFO or DEBUG.

What happens when you're working with a large application, and you only wish to debug one portion of your program? This is where Log4perl really starts to shine. Using an object-like heirarchy, you can set different logging levels for any portion of your application. Additionally, you can alter the destination of the log information based on this same heirarchy.

For an excellent introduction into how you can use this logging facility, please check out Retire your debugger, log smartly with Log::Log4perl!.

METHODS

debug( $message )

info( $message )

warn( $message )

error( $message )

fatal( $message )

Log $message when at that level or higher.

is_debug()

is_info()

is_warn()

is_error()

is_fatal()

Determine's the current log level. Returns true if at that level or higher, false otherwise.

more_logging( $delta )

less_logging( $delta )

inc_level( $delta )

dev_level( $delta )

This allows you to increase or decrease the current level of logging from within your program. $delta must be a positive integer.

BUGS

None known.

TO DO

None known.

SEE ALSO

Log::Log4perl

COPYRIGHT

Copyright (c) 2001-2002 Eric Andreychek. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHORS

Eric Andreychek <eric@openthought.net>