Browse Source

feign调用时,打印接口返回结果

lixing 3 years ago
parent
commit
971cfc17b5

+ 1 - 1
apm-common/src/main/java/com/persagy/apm/common/config/PoemsFeignExceptionHandler.java

@@ -24,6 +24,7 @@ public class PoemsFeignExceptionHandler {
 
     @AfterReturning(pointcut = "pointCutMethod()", returning = "res")
     public void process(Object res) {
+        log.info("feign调用接口,返回结果:{}", res);
         String result = null;
         String reason = null;
         if (res instanceof PoemsFeignResponse) {
@@ -40,7 +41,6 @@ public class PoemsFeignExceptionHandler {
 
         String success = "success";
         if (!success.equals(result)) {
-            log.error("feign调用接口失败,返回结果为:{}", res);
             throw new RpcException(reason);
         }
     }