diff --git a/CHANGELOG b/CHANGELOG index 7abaa1fed..4b1dd94a0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,7 @@ Version 1.1.14 work in progress - Bug #1984: CDbMigration: fix of undeclared variable usage in debug information in dropPrimaryKey (papulovskiy) - Bug #1996: Using yiic help for commands with parameters with array as default value resulted in PHP error with latest PHP versions (dInGd0nG, samdark) - Bug #2030: Fixed problem with MySQL 4.x: Undefined Index: Comment in CMysqlSchema (cebe) +- Enh: Better CFileLogRoute performance (Qiang, samdark) - Enh #1847: Added COutputCache::varyByLanguage to generate separate cache for different languages (Obramko) - Enh #2038: CFormatter::formatNtext() method can replace newlines with `

` not just with `
` as it was before (resurtm) - Chg #645: CDbConnection now throws CDbException when failed to open DB connection instead of failing with a warning (kidol, eirikhm, samdark, cebe) diff --git a/framework/logging/CFileLogRoute.php b/framework/logging/CFileLogRoute.php index 14dbf92be..1df6a13d4 100644 --- a/framework/logging/CFileLogRoute.php +++ b/framework/logging/CFileLogRoute.php @@ -140,8 +140,10 @@ class CFileLogRoute extends CLogRoute @flock($fp,LOCK_EX); if(@filesize($logFile)>$this->getMaxFileSize()*1024) $this->rotateFiles(); + $buffer=''; foreach($logs as $log) - @fwrite($fp,$this->formatLogMessage($log[0],$log[1],$log[2],$log[3])); + $buffer.=$this->formatLogMessage($log[0],$log[1],$log[2],$log[3]); + @fwrite($fp,$buffer); @flock($fp,LOCK_UN); @fclose($fp); }