yiisoft/yii2 — pull request #5997 by klimov-paul (2014-11-10 12:57:42+00:00)
Title: Fix for #5619: log message is duplicated for 'flushInterval' = 1 and 'exportInterval' = 1

Fix for #5619: log message is duplicated for 'flushInterval' = 1 and 'exportInterval' = 1

`yii\log\Logger::flush()` updated to reset messages before passing them to the dispatcher. This prevents same message to be processed twice.
Due to PHP internal optimization extra copy of `$this->messages` does not incease the memory usage, so it should be all fine.