This commit is contained in:
2021-03-02 13:44:28 +08:00
parent b2aff5732d
commit 25aa3fd320
+1 -2
View File
@@ -167,8 +167,7 @@ class Logger extends Component
$files = glob(storage(null, $dirName) . '/*');
if (count($files) >= 15) {
$command = 'find ' . storage(null, $dirName) . '/ -mtime +15 -name "*.log" -exec rm -rf {} \;';
Context::inCoroutine() ? Coroutine\System::exec($command) : exec($command);
Coroutine\System::exec('find ' . storage(null, $dirName) . '/ -mtime +15 -name "*.log" -exec rm -rf {} \;');
}
}