mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 优化日志内容
This commit is contained in:
parent
4206251226
commit
68bd16eefb
@ -14,11 +14,13 @@ class ApiLog {
|
||||
*/
|
||||
public function handle($request, \Closure $next) {
|
||||
$response = $next($request);
|
||||
|
||||
$requestInfo = $request->param();
|
||||
unset($requestInfo['API_CONF_DETAIL']);
|
||||
unset($requestInfo['APP_CONF_DETAIL']);
|
||||
ApiLogTool::setApiInfo($request->API_CONF_DETAIL);
|
||||
ApiLogTool::setAppInfo($request->APP_CONF_DETAIL);
|
||||
ApiLogTool::setRequest($request->param());
|
||||
ApiLogTool::setResponse($response->getData());
|
||||
ApiLogTool::setRequest($requestInfo);
|
||||
ApiLogTool::setResponse($response->getData(), $response->getData()['code']);
|
||||
ApiLogTool::setHeader($request->header());
|
||||
ApiLogTool::save();
|
||||
|
||||
|
@ -81,7 +81,6 @@ class ApiLogTool {
|
||||
@file_put_contents($logPath . date('YmdH') . '.log', $logStr . "\n", FILE_APPEND);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $log 被记录的内容
|
||||
* @param string $type 日志文件名称
|
||||
|
Loading…
x
Reference in New Issue
Block a user