From 3c9c93c6b8764947a92bc3d3b49905767f264028 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 27 Jan 2016 17:56:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=A7=E8=A1=8C=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/App.php | 8 +++++++- library/think/Loader.php | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/library/think/App.php b/library/think/App.php index 9b12b9ae..4995dafc 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -78,7 +78,8 @@ class App // 未指定调度类型 则进行URL路由检测 self::route($config); } - + // 记录调度信息 + Log::record('[ DISPATCH ] ' . var_export(self::$dispatch, true), 'info'); // 监听app_begin APP_HOOK && Hook::listen('app_begin'); @@ -118,6 +119,8 @@ class App { $reflect = new \ReflectionFunction($function); $args = self::bindParams($reflect, $vars); + // 记录执行信息 + Log::record('[ RUN ] ' . $reflect->getFileName(), 'info'); return $reflect->invokeArgs($args); } @@ -145,6 +148,8 @@ class App $reflect = new \ReflectionMethod($method); } $args = self::bindParams($reflect, $vars); + // 记录执行信息 + Log::record('[ RUN ] ' . $reflect->getFileName(), 'info'); return $reflect->invokeArgs(isset($class) ? $class : null, $args); } @@ -243,6 +248,7 @@ class App if (method_exists($instance, '_empty')) { $method = new \ReflectionMethod($instance, '_empty'); $data = $method->invokeArgs($instance, [$action, '']); + Log::record('[ RUN ] ' . $method->getFileName(), 'info'); } else { throw new Exception('method [ ' . (new \ReflectionClass($instance))->getName() . '->' . $action . ' ] not exists ', 10002); } diff --git a/library/think/Loader.php b/library/think/Loader.php index 84ce850e..2a49b982 100644 --- a/library/think/Loader.php +++ b/library/think/Loader.php @@ -346,6 +346,8 @@ class Loader parse_str($vars, $vars); } $method = new \ReflectionMethod($class, $action . Config::get('action_suffix')); + // 记录执行信息 + Log::record('[ RUN ] ' . $method->getFileName(), 'info'); return $method->invokeArgs($class, $vars); } }