X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=d671fc283aa2d47cb37df43a5330fd673478b9e3;hb=32620e3e2e33e336e75865b500a0d4686893e675;hp=c55563f7a0816a936f96dd0b60b46f9f36155c0c;hpb=1c99e1250cfd5cdefb5f36bd08b974c9384412e5;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index c55563f..d671fc2 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.31'; +our $VERSION = '4.32'; 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