| Log::Fine::Utils - Functional wrapper around Log::Fine |
Log::Fine::Utils - Functional wrapper around Log::Fine
Provides a functional wrapper around Log::Fine.
use Log::Fine::Handle;
use Log::Fine::Handle::File;
use Log::Fine::Handle::Syslog;
use Log::Fine::Utils;
# set up some handles as you normally would. First, a handler for
# file logging:
my $handle1 = Log::Fine::Handle::File
->new( name => "file0",
mask => Log::Fine::Handler->LOGMASK_ALL,
formatter => Log::Fine::Formatter::Basic->new() );
# and now a handle for syslog
my $handle2 = Log::Fine::Handle::Syslog
->new( name => "syslog0",
mask => LOGMASK_EMERG | LOGMASK_CRIT | LOGMASK_ERR,
ident => $0,
logopts => 'pid',
facility => LOG_LEVEL0 );
# open the logging subsystem
OpenLog( handles => [ $handle1, [$handle2], ... ],
levelmap => "Syslog");
# Log a message
Log(INFO, "The angels have my blue box");
The Utils class provides a functional wrapper for the Log::Fine manpage and friends, thus saving the developer the tedious task of mucking about in object-oriented land.
The following functions are automatically exported by Log::Fine::Utils:
Logs the message at the given log level
1 on success
Opens the logging subsystem.
A hash containing the following keys:
An array ref containing one or more the Log::Fine::Handle manpage objects
[optional] the Log::Fine::Levels manpage subclass to use. Will default to "Syslog" if not defined.
1 on success
Log::Fine::Utils defines one and only one generic logger. Multiple loggers via Utils are not currently supported.
perl, the Log::Fine manpage, the Log::Fine::Handle manpage, the Log::Fine::Logger manpage
Christopher M. Fuhrman, <cfuhrman at panix.com>
Please report any bugs or feature requests to
bug-log-fine-utils at rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Log::Fine
You can also look for information at:
$Id: cb4bc01911ff91d06d073dc7b766f67a3fbbed71 $
Copyright (c) 2008, 2010 Christopher M. Fuhrman, All rights reserved
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
| Log::Fine::Utils - Functional wrapper around Log::Fine |