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 则中断行为执行