Mike, on 13 July 2010 - 03:28 AM, said:
Aah, the problem seem to be in CLogRouter::collectLogs(). It calls collectLogs($logger,false) for all log routes. The false parameter tells the route not to process the log entries immediately. So the routes will collect the logs first and only log onEndRequest again. I think, there's no simple way to circumvent this.
But you could try to write your custom LogRouter (extends CLogRouter) and override the collectLogs() method there. You'll maybe have to flush the log route's $log property, too, each time you process the logs.
I just tried alter the CLog
s(). You mean like this, right?
public function collectLogs($event)
foreach($this->_routes as $route)
$route->logs = array();
It's working quite fine, though.