diff --git a/System/Error/Logger.php b/System/Error/Logger.php index 39c28811..06a8c807 100644 --- a/System/Error/Logger.php +++ b/System/Error/Logger.php @@ -167,7 +167,7 @@ class Logger extends Component if (!isset($this->sources[$to_day])) $this->sources[$to_day] = []; $fileName = storage('server-' . $to_day . '.log', $dirName = 'log/' . ($method ?? 'app')); - if (!isset($this->sources[$to_day][$fileName]) || !is_writeable($fileName)) { + if (!isset($this->sources[$to_day][$fileName]) || !is_writable($this->sources[$to_day][$fileName])) { $this->sources[$to_day][$fileName] = fopen($fileName, 'rw'); } fwrite($this->sources[$to_day][$fileName], '[' . date('Y-m-d H:i:s') . ']:' . PHP_EOL . $messages . PHP_EOL);