改进Trave调试输出 socket方式支持所有的请求

This commit is contained in:
thinkphp
2016-07-03 14:56:16 +08:00
parent f51c498c9b
commit a322a28f27
4 changed files with 30 additions and 12 deletions

View File

@@ -201,12 +201,8 @@ class Debug
if ($response instanceof Redirect) {
//TODO 记录
} elseif (strpos($accept, 'application/json') === 0 || $request->isAjax()) {
//TODO 记录
} elseif (!empty($contentType) && strpos($contentType, 'html') === false) {
//TODO 记录
} else {
$output = $trace->output(Log::getLog());
$output = $trace->output($response, Log::getLog());
if (is_string($output)) {
// trace调试信息注入
$content = $response->getContent();