Commit b0966f8e authored by Liu lu's avatar Liu lu

致命级错误记录

parent 63f4a4e7
...@@ -36,11 +36,13 @@ class LogTraceAspect extends AbstractAspect ...@@ -36,11 +36,13 @@ 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();
......
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