调试trace调试驱动 原来日志Socket驱动纳入trace功能

This commit is contained in:
thinkphp
2016-06-30 23:25:13 +08:00
parent 37fa2bceca
commit a61eda774f
7 changed files with 60 additions and 79 deletions

View File

@@ -12,7 +12,6 @@
namespace think;
use think\Config;
use think\debug\Trace;
use think\Exception;
use think\exception\HttpException;
use think\exception\HttpResponseException;
@@ -145,19 +144,18 @@ class App
$response = $data;
} elseif (!is_null($data)) {
// 默认自动识别响应输出类型
$isAjax = $request->isAjax();
$type = $isAjax ? Config::get('default_ajax_return') : Config::get('default_return_type');
$isAjax = $request->isAjax();
$type = $isAjax ? Config::get('default_ajax_return') : Config::get('default_return_type');
$response = Response::create($data, $type);
} else {
$response = Response::create();
}
// 监听app_end
Hook::listen('app_end', $response);
//注入Trace
self::$debug && Trace::inject($response);
// Trace调试注入
Debug::inject($response);
return $response;
}