X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=eeac89eaab04ed17447a16384a3d86a1c5852c5b;hb=26e6b22632433ceb13b50324d72fadaf5098c49a;hp=5208501cddbd7cf0a2c9918d818563342219cc3f;hpb=caca1b02bf3a1559079047dde1edf73bfee358da;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 5208501..eeac89e 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -7,7 +7,7 @@ use Catalyst::Log; __PACKAGE__->mk_classdata($_) for qw/_config log/; -our $VERSION = '4.32'; +our $VERSION = '4.33'; our @ISA; =head1 NAME @@ -152,8 +152,8 @@ sub import { } } - unless ( $self->log ) { - $self->log( Catalyst::Log->new ); + unless ( $caller->log ) { + $caller->log( Catalyst::Log->new ); } # Options @@ -197,6 +197,18 @@ sub import { $caller->log->debug(qq/Loaded engine "$engine"/) if $caller->debug; } +=item $c->log + +Contains the logging object. Unless it is already set Catalyst sets this up with a +C object. To use your own log class: + + $c->log( MyLogger->new ); + $c->log->info("now logging with my own logger!"); + +Your log class should implement the methods described in the C +man page. + + =back =head1 SUPPORT