Commit a5ee47bf authored by Liu lu's avatar Liu lu

日志优化

parent bcbf4b57
......@@ -45,7 +45,7 @@ class LogTraceAspect extends AbstractAspect
$requestId = LogTraceHandler::getRequestId();
register_shutdown_function(function ()use($requestId,$originParams,$proceedingJoinPoint) {
put_log(array_merge([
put_log(json_encode([
'request_id'=>$requestId,'error_msg'=>error_get_last()
],$originParams),
str_replace('\\','_',$proceedingJoinPoint->className).
......
......@@ -103,13 +103,10 @@ class LogTraceHandler
$track->getFile() . " line:" .
$track->getLine() . "\n" .
$track->getTraceAsString();
}
if (is_array($track)) {
$logInfo = var_export($track, true);
}
if (is_string($track)||is_numeric($track)) {
}else if (is_string($track)||is_numeric($track)) {
$logInfo = $track;
}else{
$logInfo = print_r($track, true);
}
$logInfo .= "\n\n";
......
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