Skip to content

Commit

Permalink
fix log request serialize error
Browse files Browse the repository at this point in the history
  • Loading branch information
piaolingxue committed Jun 23, 2021
1 parent 0acda5c commit e38c2ec
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.alibaba.cola.exception.BizException;
import com.alibaba.cola.exception.SysException;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
Expand Down Expand Up @@ -88,10 +89,13 @@ private void logResponse(long startTime, Object response) {

private void logRequest(ProceedingJoinPoint joinPoint) {
try {
if (!log.isDebugEnabled()) {
return;
}
log.debug("START PROCESSING: " + joinPoint.getSignature().toShortString());
Object[] args = joinPoint.getArgs();
for (Object arg : args) {
log.debug("REQUEST : " + JSON.toJSONString(arg));
log.debug("REQUEST : " + JSON.toJSONString(arg, SerializerFeature.IgnoreErrorGetter));
}
}
catch (Exception e){
Expand Down

0 comments on commit e38c2ec

Please sign in to comment.