[Catalyst] Logging is not immediate

Toby Corkindale toby.corkindale at strategicdata.com.au
Mon Oct 18 23:58:57 GMT 2010

On 19/10/10 10:46, Ken Beal wrote:
> Hi,
> I’m running Catalyst via the scripts\myapp_server.pl script. I have
> never configured it to run under a web server, and perhaps that’s the
> answer to my question.
> The issue is that when I call $c->log(), it doesn’t output anything
> until the “URL call” completes. This makes it difficult to watch a
> long-running process, because I don’t see anything until it’s done, and
> I don’t know if it’s hung up on something because I can’t see the log
> output.
> Has anyone else experienced this, and found a useful workaround or fix?
> Like I said, if I have to run it under Apache or IIS in order for this
> to work, I’ll do so.

Hi Ken,
You will find the same behaviour when running under a web server.
ie. Log messages are saved up and then emitted all at once at the end of 
the request.

I'm pretty sure this is By Design in Catalyst's default logger.

However there is nothing stopping you from installing a different 
logging module into $c->log. I've used a Syslog one in the past.


More information about the Catalyst mailing list