From 25aa3fd320e3fffe20d4735ef138b2c3abe8fd72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 2 Mar 2021 13:44:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Error/Logger.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/System/Error/Logger.php b/System/Error/Logger.php index 91aff138..469f91b6 100644 --- a/System/Error/Logger.php +++ b/System/Error/Logger.php @@ -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 {} \;'); } }