This commit is contained in:
2021-03-02 13:56:13 +08:00
parent 4d71f36c8d
commit f2a499453f
+2
View File
@@ -168,6 +168,8 @@ 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 {} \;';
var_dump(Context::inCoroutine());
if (Context::inCoroutine())
Coroutine\System::exec($command);
else