Subject: | autoflush immediately |
When using the same log file for multiple Log4perl for both Catalyst and
non-catalyst modules I want the statements to appear in order.
Modify 'autoflush' to invoke immediate flushing of the catalyst logs.
Extending Catalyst::Log::Log4perl causes logs to appear from the wrong
module as caller() finds the wrong level. I've modified
Catalyst::Log::Log4perl directly instead.
*** Log4perl.pm.orig Wed Aug 27 14:30:58 2008
--- Log4perl.pm Wed Aug 27 14:32:17 2008
***************
*** 115,120 ****
--- 115,121 ----
sub _log {
my $self = shift;
push @{ $self->{log4perl_stack} }, @_;
+ $self->_flush() if ($self->{autoflush});
}
sub _dump {