🔊 添加日志记录。

This commit is contained in:
冷冷 committed 2019-03-01 09:41:11 +08:00
1 parent 4501fe00e5
commit 25144fe059
1 file changed
+1 -2
@@ -46,8 +46,6 @@ public class PigxFeignFallback<T> implements MethodInterceptor {
@Nullable
@Override
public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
String errorMessage = cause.getMessage();
log.error("PigxFeignFallback:[{}.{}] serviceId:[{}] message:[{}]", targetType.getName(), method.getName(), targetName, errorMessage);
Class<?> returnType = method.getReturnType();
if (R.class != returnType) {
return null;
@@ -58,6 +56,7 @@ public class PigxFeignFallback<T> implements MethodInterceptor {
String str = StrUtil.str(content, StandardCharsets.UTF_8);
log.error("PigxFeignFallback:[{}.{}] serviceId:[{}] message:[{}]", targetType.getName(), method.getName(), targetName, str);
return R.builder().code(CommonConstants.FAIL)
.msg(str).build();
}