Flushing logs halfway through a request? Sometimes I have long running requests that do imports or similar. 

Currently logging using MyPlugin::log is only actually written to file once the request is done. 

Is there a way to trigger log-flushing mid-request?
You should be able to do that with something like this:

Craft::getLogger()-&gt;flush();