From e654fcae5ca805d5e4eefd79a282701684ef4fb5 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 20 Dec 2015 18:23:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=97=A5=E5=BF=97=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base.php | 2 +- library/think/db/lite.php | 2 +- library/think/hook.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base.php b/base.php index c4903edc..41002257 100644 --- a/base.php +++ b/base.php @@ -96,7 +96,7 @@ function G($start, $end = '', $dec = 6) if ('' == $end) { think\Debug::remark($start); } else { - return 'm' == $dec ? think\Debug::getUseMem($start, $end) : think\Debug::getUseTime($start, $end, $dec); + return 'm' == $dec ? think\Debug::getRangeMem($start, $end) : think\Debug::getRangeTime($start, $end, $dec); } } diff --git a/library/think/db/lite.php b/library/think/db/lite.php index 70186123..2aa066d9 100644 --- a/library/think/db/lite.php +++ b/library/think/db/lite.php @@ -441,7 +441,7 @@ class Lite //$this->model = '_think_'; // 记录操作结束时间 Debug::remark('queryEndTime', 'time'); - Log::record($this->queryStr . ' [ RunTime:' . Debug::getUseTime('queryStartTime', 'queryEndTime') . 's ]', 'SQL'); + Log::record($this->queryStr . ' [ RunTime:' . Debug::getRangeTime('queryStartTime', 'queryEndTime') . 's ]', 'sql'); } } } diff --git a/library/think/hook.php b/library/think/hook.php index f28c31d8..dc7bc54a 100644 --- a/library/think/hook.php +++ b/library/think/hook.php @@ -98,7 +98,7 @@ class Hook if (APP_DEBUG) { Debug::remark('behavior_end', 'time'); - Log::record('Run ' . $name . ' [ RunTime:' . Debug::getUseTime('behavior_start', 'behavior_end') . 's ]', 'INFO'); + Log::record('Run ' . $name . ' [ RunTime:' . Debug::getRangeTime('behavior_start', 'behavior_end') . 's ]', 'log'); } if (false === $result) { // 如果返回false 则中断行为执行