瀏覽代碼

熔断日志格式修改

gaodm 6 年之前
父節點
當前提交
7b5d1cce53
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      user-service/src/main/java/com/diagbot/client/hystrix/AuthServiceHystrix.java

+ 3 - 1
user-service/src/main/java/com/diagbot/client/hystrix/AuthServiceHystrix.java

@@ -3,6 +3,7 @@ package com.diagbot.client.hystrix;
 
 import com.diagbot.client.AuthServiceClient;
 import com.diagbot.entity.JWT;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 
 /**
@@ -11,10 +12,11 @@ import org.springframework.stereotype.Component;
  * @time: 2018/8/2 13:37
  */
 @Component
+@Slf4j
 public class AuthServiceHystrix implements AuthServiceClient {
     @Override
     public JWT getToken(String authorization, String type, String username, String password) {
-        System.out.println("--------opps getToken hystrix---------");
+        log.error("【hystrix】调用{}异常","getToken");
         return null;
     }
 }