mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-12 03:30:12 +08:00
Fixes #1500: Log messages exported to files are not separated by newlines
This commit is contained in:
@@ -6,6 +6,7 @@ Yii Framework 2 Change Log
|
|||||||
|
|
||||||
- Bug #1446: Logging while logs are processed causes infinite loop (qiangxue)
|
- Bug #1446: Logging while logs are processed causes infinite loop (qiangxue)
|
||||||
- Bug #1497: Localized view files are not correctly returned (mintao)
|
- Bug #1497: Localized view files are not correctly returned (mintao)
|
||||||
|
- Bug #1500: Log messages exported to files are not separated by newlines (omnilight, qiangxue)
|
||||||
- Bug #1509: The SQL for creating Postgres RBAC tables is incorrect (qiangxue)
|
- Bug #1509: The SQL for creating Postgres RBAC tables is incorrect (qiangxue)
|
||||||
- Bug: Fixed `Call to a member function registerAssetFiles() on a non-object` in case of wrong `sourcePath` for an asset bundle (samdark)
|
- Bug: Fixed `Call to a member function registerAssetFiles() on a non-object` in case of wrong `sourcePath` for an asset bundle (samdark)
|
||||||
- Enh #1293: Replaced Console::showProgress() with a better approach. See Console::startProgress() for details (cebe)
|
- Enh #1293: Replaced Console::showProgress() with a better approach. See Console::startProgress() for details (cebe)
|
||||||
|
|||||||
@@ -83,10 +83,7 @@ class FileTarget extends Target
|
|||||||
*/
|
*/
|
||||||
public function export()
|
public function export()
|
||||||
{
|
{
|
||||||
$text = '';
|
$text = implode("\n", array_map([$this, 'formatMessage'], $this->messages)) . "\n";
|
||||||
foreach ($this->messages as $message) {
|
|
||||||
$text .= $this->formatMessage($message);
|
|
||||||
}
|
|
||||||
if (($fp = @fopen($this->logFile, 'a')) === false) {
|
if (($fp = @fopen($this->logFile, 'a')) === false) {
|
||||||
throw new InvalidConfigException("Unable to append to log file: {$this->logFile}");
|
throw new InvalidConfigException("Unable to append to log file: {$this->logFile}");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user