From: Curtis "Ovid" Poe Date: Sat, 14 Jan 2006 01:46:55 +0000 (+0000) Subject: Tiny document update to make it a bit clearer how one overrides the standard X-Git-Tag: 5.7099_04~748 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=9e7673af3a03f61edd17142d1ebfd415119e48be Tiny document update to make it a bit clearer how one overrides the standard log object --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 461ac6d..179c7ac 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -471,10 +471,16 @@ L. =head2 $c->log -Returns the logging object instance. Unless it is already set, Catalyst -sets this up with a L object. To use your own log class: +Returns the logging object instance. Unless it is already set, Catalyst sets +this up with a L object. To use your own log class, set the +logger with the C<< __PACKAGE__->log >> method prior to calling +C<< __PACKAGE__->setup >>. + + __PACKAGE__->log( MyLogger->new ); + __PACKAGE__->setup; + +And later: - $c->log( MyLogger->new ); $c->log->info( 'Now logging with my own logger!' ); Your log class should implement the methods described in the