Catalyst::Log - Catalyst Log Class
$log = $c->log; $log->debug($message); $log->info($message); $log->warn($message); $log->error($message); $log->fatal($message); if ( $log->is_debug ) { # expensive debugging }
See Catalyst.
This module provides the default, simple logging functionality for Catalyst. If you want something different set $c-log> in your application module, e.g.:
$c-
$c->log( MyLogger->new );
Your logging object is expected to provide the interface described here.
$log->is_debug; $log->debug($message);
$log->is_info; $log->info($message);
$log->is_warn; $log->warn($message);
$log->is_error; $log->error($message);
$log->is_fatal; $log->fatal($message);
Constructor, defaults to enable all levels unless levels a provieded in arguments.
$log = Catalyst::Log->new; $log = Catalyst::Log->new( 'warn', 'error', 'fatal' );
Set log levels
$log->levels( 'warn', 'error', 'fatal' );
Enable log levels
$log->enable( 'warn', 'error' );
Disable log levels
$log->disable( 'warn', 'error' );
Is the log level active?
Catalyst.
Sebastian Riedel, sri@cpan.org Marcus Ramberg, mramberg@cpan.org Christian Hansen, ch@ngmedia.com
sri@cpan.org
mramberg@cpan.org
ch@ngmedia.com
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst
CPAN shell
perl -MCPAN -e shell install Catalyst
For more information on module installation, please visit the detailed CPAN module installation guide.