diff --git a/convention.php b/convention.php index ac6a2ce1..8ea38c69 100644 --- a/convention.php +++ b/convention.php @@ -140,7 +140,7 @@ return [ // +---------------------------------------------------------------------- 'log' => [ - // 日志记录方式,支持 file socket trace sae + // 日志记录方式,支持 file socket sae 'type' => 'File', // 日志保存目录 'path' => LOG_PATH, @@ -150,7 +150,7 @@ return [ // | Trace设置 // +---------------------------------------------------------------------- 'trace' => [ - 'type' => 'Html' + 'type' => 'Html' //支持Html,Console 设为false则不显示 ], // +---------------------------------------------------------------------- diff --git a/library/think/App.php b/library/think/App.php index 53118d69..b881f921 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -151,12 +151,14 @@ class App } else { $response = Response::create(); } - - self::$debug && Trace::inject($response); + // 监听app_end Hook::listen('app_end', $response); + //注入Trace + self::$debug && Trace::inject($response); + return $response; }