[Catalyst] log4perl autoflush (buffering log output?)

Adam Bartosik moldovenu at gmail.com
Tue Sep 11 12:26:02 GMT 2007


I have log4perl configured that way:

log4perl.appender.SCREEN=Log::Log4perl::Appender::Screen
log4perl.appender.SCREEN.layout=Log::Log4perl::Layout::PatternLayout
log4perl.appender.SCREEN.layout.ConversionPattern = %d{hh:mm:ss}> %m%n
log4perl.appender.SCREEN.autoflush = 1

and there is a controller which looks like:

sub test123 : Local {
    my ($self, $c) = @_;
    $c->log->debug("time: " . localtime );
    sleep 5;
    $c->log->debug("time: " . localtime );
    $c->res->body("ok");
}

but the console output is like:
12:50:46> time: Tue Sep 11 12:50:40 2007
12:50:46> time: Tue Sep 11 12:50:45 2007

Log time from log4perl is the same for all debug messages :(

I know there are problems (and patches) to show proper line/module
where log event occured with log4perl. What about this log-event time?

-- 
Adam Bartosik



More information about the Catalyst mailing list