Commit b0966f8e authored by Liu lu's avatar Liu lu

致命级错误记录

parent 63f4a4e7
...@@ -36,12 +36,14 @@ class LogTraceAspect extends AbstractAspect ...@@ -36,12 +36,14 @@ class LogTraceAspect extends AbstractAspect
$originParams $originParams
); );
$requestId = LogTraceHandler::getRequestId(); $requestId = LogTraceHandler::getRequestId();
register_shutdown_function(function ()use($requestId) { register_shutdown_function(function ()use($requestId,$originParams,$proceedingJoinPoint) {
LogTraceHandler::recordProcess(
'致命级错误:'.json_encode(error_get_last()), put_log(array_merge([
false, 'request_id'=>$requestId,'error_msg'=>error_get_last()
$requestId ],$originParams),
); str_replace('\\','_',$proceedingJoinPoint->className).
'/'.$proceedingJoinPoint->methodName
);
}); });
$result = $proceedingJoinPoint->process(); $result = $proceedingJoinPoint->process();
LogTraceHandler::recordProcess('返回结果:'.json_encode($result)); LogTraceHandler::recordProcess('返回结果:'.json_encode($result));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment