Skip to content

Commit

Permalink
fix wirte clog
Browse files Browse the repository at this point in the history
  • Loading branch information
sakuraovq committed Dec 1, 2019
1 parent ce048b4 commit e88c4d5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/log/src/Handler/CFileHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class CFileHandler extends FileHandler
*/
protected function write(array $record): void
{
if (empty($this->logFile)) {
return;
}

// Logger no ready
if (!$this->boot) {
$this->bootingRecords[] = [$record];
Expand All @@ -52,7 +56,11 @@ protected function write(array $record): void
*/
public function init(): void
{
if ($this->boot || empty($this->logFile)) {
if (empty($this->logFile)) {
return;
}

if ($this->boot) {
return;
}
parent::init();
Expand Down

0 comments on commit e88c4d5

Please sign in to comment.