Commit 3548158f by 丁伟峰

接口日志,改用json显示输出

1 parent 2919af32
package com.alibaba.cloud.integration.order.interceptor;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
......@@ -69,7 +70,8 @@ public class RequestInterceptor implements HandlerInterceptor {
long startTime = System.currentTimeMillis();
Object result = proceedingJoinPoint.proceed();
// 打印出参
log.info("Response Args : {}", result);
// log.info("Response Args : {}", result);
log.info("Response Args : {}", new ObjectMapper().writeValueAsString(result));
// 执行耗时
log.info("Time-Consuming : {} ms", System.currentTimeMillis() - startTime);
log.info("=========================================== End ===========================================");
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!