This commit is contained in:
2021-07-22 17:53:19 +08:00
parent decb85b493
commit 0b05eb1a27
+1 -1
View File
@@ -167,7 +167,7 @@ class Logger extends Component
if (!isset($this->sources[$to_day])) $this->sources[$to_day] = []; if (!isset($this->sources[$to_day])) $this->sources[$to_day] = [];
$fileName = storage('server-' . $to_day . '.log', $dirName = 'log/' . ($method ?? 'app')); $fileName = storage('server-' . $to_day . '.log', $dirName = 'log/' . ($method ?? 'app'));
if (!isset($this->sources[$to_day][$fileName]) || !is_writable($this->sources[$to_day][$fileName])) { if (!isset($this->sources[$to_day][$fileName])) {
$this->sources[$to_day][$fileName] = fopen($fileName, 'rw'); $this->sources[$to_day][$fileName] = fopen($fileName, 'rw');
} }
try { try {