From 8f8e796c777577dcef888b94603ed93bebcc1ee6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?=
<15040126243@163.com>
Date: Mon, 6 Dec 2021 14:36:38 +0800
Subject: [PATCH] =?UTF-8?q?update=20tlog=201.3.4=20=3D>=201.3.5=20?=
=?UTF-8?q?=E5=90=AF=E7=94=A8=20tlog=20=E8=87=AA=E5=8A=A8=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 22 ++-----------
ruoyi-common/pom.xml | 10 ------
ruoyi-framework/pom.xml | 5 +++
.../PlusWebInvokeTimeInterceptor.java | 8 ++---
.../ruoyi/framework/config/TLogConfig.java | 33 +++----------------
ruoyi-job/pom.xml | 2 +-
.../com/ruoyi/job/config/XxlJobConfig.java | 8 +----
7 files changed, 18 insertions(+), 70 deletions(-)
diff --git a/pom.xml b/pom.xml
index 1328919b..0dd48a3b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
3.16.4
2.2.1
3.4.1
- 1.3.4
+ 1.3.5
2.3.0
@@ -203,29 +203,13 @@
com.yomahub
- tlog-spring-boot-configuration
+ tlog-web-spring-boot-starter
${tlog.version}
com.yomahub
- tlog-webroot
- ${tlog.version}
-
-
- javassist
- org.javassist
-
-
- guava
- com.google.guava
-
-
-
-
-
- com.yomahub
- tlog-xxl-job
+ tlog-xxljob-spring-boot-starter
${tlog.version}
diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml
index c153cd5b..2111510a 100644
--- a/ruoyi-common/pom.xml
+++ b/ruoyi-common/pom.xml
@@ -140,16 +140,6 @@
lock4j-redisson-spring-boot-starter
-
- com.yomahub
- tlog-spring-boot-configuration
-
-
-
- com.yomahub
- tlog-webroot
-
-
diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml
index d5466af2..a368e5e2 100644
--- a/ruoyi-framework/pom.xml
+++ b/ruoyi-framework/pom.xml
@@ -63,6 +63,11 @@
ruoyi-common
+
+ com.yomahub
+ tlog-web-spring-boot-starter
+
+
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/Interceptor/PlusWebInvokeTimeInterceptor.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/Interceptor/PlusWebInvokeTimeInterceptor.java
index e2120bf0..a82fb65c 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/Interceptor/PlusWebInvokeTimeInterceptor.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/Interceptor/PlusWebInvokeTimeInterceptor.java
@@ -35,14 +35,14 @@ public class PlusWebInvokeTimeInterceptor extends AbsTLogWebHandlerMethodInterce
// 打印请求参数
if (isJsonRequest(request)) {
String jsonParam = new RequestWrapper(request).getBodyString();
- log.info("[PLUS]开始请求 => URL[{}],参数类型[json],参数:[{}]", url, jsonParam);
+ log.debug("[PLUS]开始请求 => URL[{}],参数类型[json],参数:[{}]", url, jsonParam);
} else {
Map parameterMap = request.getParameterMap();
if (MapUtil.isNotEmpty(parameterMap)) {
String parameters = JsonUtils.toJsonString(parameterMap);
- log.info("[PLUS]开始请求 => URL[{}],参数类型[param],参数:[{}]", url, parameters);
+ log.debug("[PLUS]开始请求 => URL[{}],参数类型[param],参数:[{}]", url, parameters);
} else {
- log.info("[PLUS]开始请求 => URL[{}],无参数", url);
+ log.debug("[PLUS]开始请求 => URL[{}],无参数", url);
}
}
@@ -63,7 +63,7 @@ public class PlusWebInvokeTimeInterceptor extends AbsTLogWebHandlerMethodInterce
if (TLogContext.enableInvokeTimePrint()) {
StopWatch stopWatch = invokeTimeTL.get();
stopWatch.stop();
- log.info("[PLUS]结束请求 => URL[{}],耗时:[{}]毫秒", request.getMethod() + " " + request.getRequestURI(), stopWatch.getTime());
+ log.debug("[PLUS]结束请求 => URL[{}],耗时:[{}]毫秒", request.getMethod() + " " + request.getRequestURI(), stopWatch.getTime());
invokeTimeTL.remove();
}
}
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/TLogConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/TLogConfig.java
index c1665d9b..5ae55add 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/TLogConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/TLogConfig.java
@@ -1,13 +1,8 @@
package com.ruoyi.framework.config;
-import com.yomahub.tlog.core.aop.AspectLogAop;
-import com.yomahub.tlog.spring.TLogPropertyInit;
-import com.yomahub.tlog.spring.TLogSpringAware;
-import com.yomahub.tlog.springboot.property.TLogProperty;
-import org.springframework.context.annotation.Bean;
+import com.yomahub.tlog.springboot.TLogWebAutoConfiguration;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-import org.springframework.core.annotation.Order;
/**
* 整合 TLog 框架配置
@@ -15,29 +10,9 @@ import org.springframework.core.annotation.Order;
* @author Lion Li
* @since 3.3.0
*/
-@Order(-999)
@Configuration
-@Import(TLogProperty.class)
+// 排除 web 自动配置 自定义实现
+@EnableAutoConfiguration(exclude = TLogWebAutoConfiguration.class)
public class TLogConfig {
- @Bean
- public TLogPropertyInit tLogPropertyInit(TLogProperty tLogProperty) {
- TLogPropertyInit tLogPropertyInit = new TLogPropertyInit();
- tLogPropertyInit.setPattern(tLogProperty.getPattern());
- tLogPropertyInit.setEnableInvokeTimePrint(tLogProperty.enableInvokeTimePrint());
- tLogPropertyInit.setIdGenerator(tLogProperty.getIdGenerator());
- tLogPropertyInit.setMdcEnable(tLogProperty.getMdcEnable());
- return tLogPropertyInit;
- }
-
- @Bean
- public TLogSpringAware tLogSpringAware(){
- return new TLogSpringAware();
- }
-
- @Bean
- public AspectLogAop aspectLogAop() {
- return new AspectLogAop();
- }
-
}
diff --git a/ruoyi-job/pom.xml b/ruoyi-job/pom.xml
index a87b3efe..3c13d355 100644
--- a/ruoyi-job/pom.xml
+++ b/ruoyi-job/pom.xml
@@ -31,7 +31,7 @@
com.yomahub
- tlog-xxl-job
+ tlog-xxljob-spring-boot-starter
diff --git a/ruoyi-job/src/main/java/com/ruoyi/job/config/XxlJobConfig.java b/ruoyi-job/src/main/java/com/ruoyi/job/config/XxlJobConfig.java
index 2df063e3..e051ff0d 100644
--- a/ruoyi-job/src/main/java/com/ruoyi/job/config/XxlJobConfig.java
+++ b/ruoyi-job/src/main/java/com/ruoyi/job/config/XxlJobConfig.java
@@ -2,7 +2,6 @@ package com.ruoyi.job.config;
import com.ruoyi.job.config.properties.XxlJobProperties;
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
-import com.yomahub.tlog.springboot.lifecircle.TLogXxljobEnhanceInit;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
@@ -40,9 +39,4 @@ public class XxlJobConfig {
return xxlJobSpringExecutor;
}
- @Bean
- public TLogXxljobEnhanceInit tLogXxljobEnhanceInit(){
- return new TLogXxljobEnhanceInit();
- }
-
-}
\ No newline at end of file
+}