Acrux
view release on metacpan or search on metacpan
lib/Acme/Crux/Plugin/Log.pm view on Meta::CPAN
package Acme::Crux::Plugin::Log;
use warnings;
use strict;
use utf8;
=encoding utf-8
=head1 NAME
Acme::Crux::Plugin::Log - The Acme::Crux plugin for logging in your application
=head1 SYNOPSIS
# In startup
$app->plugin('Log');
$app->plugin('Log', undef, { ... options ... });
# In application
$app->log->trace('Whatever');
$app->log->debug('You screwed up, but that is ok');
$app->log->info('You are bad, but you prolly know already');
$app->log->notice('Normal, but significant, condition...');
$app->log->warn('Dont do that Dave...');
$app->log->error('You really screwed up this time');
$app->log->fatal('Its over...');
$app->log->crit('Its over...');
$app->log->alert('Action must be taken immediately');
$app->log->emerg('System is unusable');
=head1 DESCRIPTION
The Acme::Crux plugin for logging in your application
=head1 OPTIONS
This plugin supports the following options
=head2 autoclean
$app->plugin(Log => undef, {autoclean => 1});
This option enables cleaning (closing handler or syslog) on DESTROY
Default: C<logautoclean> command line option or C<logautoclean> application argument
or C<LogAutoclean> configuration value or C<0> otherwise
=head2 color
$app->plugin(Log => undef, {color => 1});
This option enables colorize log messages with the available levels using L<Term::ANSIColor>
Default: C<logcolorize> command line option or C<logcolorize> application argument
or C<LogColorize> configuration value or C<0> otherwise
=head2 facility
$app->plugin(Log => undef, {facility => 'user'});
This option sets facility for logging
Available standard facilities: C<auth>, C<authpriv>, C<cron>, C<daemon>, C<ftp>,
C<kern>, C<local0>, C<local1>, C<local2>, C<local3>, C<local4>, C<local5>, C<local6>,
C<local7>, C<lpr>, C<mail>, C<news>, C<syslog>, C<user> and C<uucp>
Default: C<logfacility> command line option or C<logfacility> application argument
( run in 2.043 seconds using v1.01-cache-2.11-cpan-0d23b851a93 )