diff --git a/System/Error/Logger.php b/System/Error/Logger.php index 31bdca64..01887df9 100644 --- a/System/Error/Logger.php +++ b/System/Error/Logger.php @@ -168,10 +168,10 @@ 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 {} \;'; -// if (Context::inCoroutine()) -// Coroutine\System::exec($command); -// else -// exec($command); + if (Context::inCoroutine()) + Coroutine\System::exec($command); + else + exec($command); } }