From d643d38be4d163c21f764c0476b3750b18c5a297 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sun, 25 Apr 2021 01:39:40 +0800 Subject: [PATCH] modify --- Database/Command.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Database/Command.php b/Database/Command.php index 89fb933f..bca84243 100644 --- a/Database/Command.php +++ b/Database/Command.php @@ -149,9 +149,11 @@ class Command extends Component { $export['sql'] = $this->sql; $export['param'] = $this->params; - $export['time'] = microtime(true) - $time; + $export['startTime'] = $time; + $export['endTime'] = microtime(true); + $export['time'] = $export['endTime'] - $time; - logger()->debug(Json::encode($export), 'mysql'); + write(Json::encode($export), 'mysql'); return $result; }