diff --git a/README.md b/README.md index be7eaf6..1fc774a 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ gitee项目地址:[https://gitee.com/lianjiatech/retrofit-spring-boot-starter] com.github.lianjiatech retrofit-spring-boot-starter - 3.1.0 + 3.1.1 ``` diff --git a/README_EN.md b/README_EN.md index 93d8a9e..0410a59 100644 --- a/README_EN.md +++ b/README_EN.md @@ -41,7 +41,7 @@ com.github.lianjiatech retrofit-spring-boot-starter - 3.1.0 + 3.1.1 ``` diff --git a/pom.xml b/pom.xml index a89b775..17a68ad 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.github.lianjiatech retrofit-spring-boot-starter - 3.1.0 + 3.1.1 retrofit-spring-boot-starter retrofit-spring-boot-starter diff --git a/src/main/java/com/github/lianjiatech/retrofit/spring/boot/log/LoggingInterceptor.java b/src/main/java/com/github/lianjiatech/retrofit/spring/boot/log/LoggingInterceptor.java index a77e948..342abc9 100644 --- a/src/main/java/com/github/lianjiatech/retrofit/spring/boot/log/LoggingInterceptor.java +++ b/src/main/java/com/github/lianjiatech/retrofit/spring/boot/log/LoggingInterceptor.java @@ -29,8 +29,11 @@ public Response intercept(Chain chain) throws IOException { if (!needLog(logging)) { return chain.proceed(chain.request()); } - LogLevel logLevel = logging == null ? globalLogProperty.getLogLevel() : logging.logLevel(); LogStrategy logStrategy = logging == null ? globalLogProperty.getLogStrategy() : logging.logStrategy(); + if (logStrategy == LogStrategy.NONE) { + return chain.proceed(chain.request()); + } + LogLevel logLevel = logging == null ? globalLogProperty.getLogLevel() : logging.logLevel(); boolean aggregate = logging == null ? globalLogProperty.isAggregate() : logging.aggregate(); HttpLoggingInterceptor.Logger matchLogger = matchLogger(logLevel); HttpLoggingInterceptor.Logger logger = aggregate ? new BufferingLogger(matchLogger) : matchLogger;