From 1cf72793185ba97b43d1bd8b61eb51abaca8e101 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 17 Feb 2016 15:04:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20Hook=E7=B1=BB=E4=B8=80?= =?UTF-8?q?=E5=A4=84=E8=AD=A6=E5=91=8A=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Hook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Hook.php b/library/think/Hook.php index 8197bfa0..f5e55af4 100644 --- a/library/think/Hook.php +++ b/library/think/Hook.php @@ -101,7 +101,7 @@ class Hook if (APP_DEBUG) { Debug::remark('behavior_end', 'time'); - Log::record('[ BEHAVIOR ] Run ' . $name . ' @' . $tag . ' [ RunTime:' . Debug::getRangeTime('behavior_start', 'behavior_end') . 's ]', 'log'); + Log::record('[ BEHAVIOR ] Run ' . ($name instanceof \Closure ? 'Closure' : $name) . ' @' . $tag . ' [ RunTime:' . Debug::getRangeTime('behavior_start', 'behavior_end') . 's ]', 'info'); } if (false === $result) { // 如果返回false 则中断行为执行