NAME
Catalyst::Log - Catalyst Log Class
SYNOPSIS
$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.
DESCRIPTION
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->log( MyLogger->new );
Your logging object is expected to provide the interface described here.
LOG LEVELS
- debug
-
$log->is_debug; $log->debug($message);
- info
-
$log->is_info; $log->info($message);
- warn
-
$log->is_warn; $log->warn($message);
- error
-
$log->is_error; $log->error($message);
- fatal
-
$log->is_fatal; $log->fatal($message);
METHODS
- new
-
Constructor, defaults to enable all levels unless levels a provieded in arguments.
$log = Catalyst::Log->new; $log = Catalyst::Log->new( 'warn', 'error', 'fatal' );
- levels
-
Set log levels
$log->levels( 'warn', 'error', 'fatal' );
- enable
-
Enable log levels
$log->enable( 'warn', 'error' );
- disable
-
Disable log levels
$log->disable( 'warn', 'error' );
- is_debug
- is_error
- is_fatal
- is_info
- is_warn
-
Is the log level active?
SEE ALSO
AUTHOR
Sebastian Riedel, sri@cpan.org
Marcus Ramberg, mramberg@cpan.org
Christian Hansen, ch@ngmedia.com
COPYRIGHT
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.