yiisoft/yii — Issue #424: CProfileLogRoute found a mismatching code block - flush after profile begin
Author: davemcnair
Created: 2012-03-01 11:01:50+00:00
State: open

CLogger should not flush after profile begin, here is a patch to fix

public function log($message,$level='info',$category='application')
{
$this->_logs[]=array($message,$level,$category,microtime(true));
$this->_logCount++;
if($this->autoFlush>0 && $this->_logCount>=$this->autoFlush && !$this->_processing)
{
if($level==CLogger::LEVEL_PROFILE && strncasecmp($message,'begin:',6))
{
//do nothing
}
else
{
$this->_processing=true;
$this->flush($this->autoDump);
$this->_processing=false;
}
}
}