perl-catalyst/catalyst-runtime — pull request #32 by vanstyn (2014-05-13 16:42:08+00:00)
Title: API change: new 'autoflush' feature in Catalyst::Log

As discussed with mst/jnap/others:

The Catalyst::Log object now has 'autoflush' (which defaults to true) and causes log messages to be written out in real-time. This is helpful for the test/dev server to be able to see messages during startup as well as before the end of the request when the log is flushed.

The reason the logs weren't already written in real-time (as it was explained to me) was simply for Static::Simple to be able to suppress logging for static requests (since they can be so noisy).

mst said this new feature should be on by default, which means Static::Simple, and any other packages wanting the old behavior, need to be updated to turn the new autoflush flag off.

Here is a commit that does this for Static::Simple (I can't do a pull req for it because its not on github):

https://github.com/vanstyn/Catalyst-Plugin-Static-Simple/commit/659bc603b5498eae0bf93e3f27b25e71331961fc

There is also an example in the POD for turning off autoflush, which is fairly straightforward.