Tiny document update to make it a bit clearer how one overrides the standard
Curtis "Ovid" Poe [Sat, 14 Jan 2006 01:46:55 +0000 (01:46 +0000)]
log object

lib/Catalyst.pm

index 461ac6d..179c7ac 100644 (file)
@@ -471,10 +471,16 @@ L<Catalyst::Engine>.
 
 =head2 $c->log
 
-Returns the logging object instance. Unless it is already set, Catalyst
-sets this up with a L<Catalyst::Log> object. To use your own log class:
+Returns the logging object instance. Unless it is already set, Catalyst sets
+this up with a L<Catalyst::Log> 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