From 630cb0babb264657d8a07476e328654573620f8c Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期六, 15 一月 2022 13:41:47 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity
---
java110-service/src/main/java/com/java110/service/init/ServiceStartInit.java | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/java110-service/src/main/java/com/java110/service/init/ServiceStartInit.java b/java110-service/src/main/java/com/java110/service/init/ServiceStartInit.java
index 108a64f..a352825 100755
--- a/java110-service/src/main/java/com/java110/service/init/ServiceStartInit.java
+++ b/java110-service/src/main/java/com/java110/service/init/ServiceStartInit.java
@@ -1,6 +1,6 @@
package com.java110.service.init;
-import com.java110.core.log.LogAgent;
+import com.java110.dto.system.SystemLogDto;
import com.java110.utils.factory.ApplicationContextFactory;
import com.java110.utils.util.StringUtil;
import org.slf4j.Logger;
@@ -17,23 +17,31 @@
private static Environment env;
- public static void initSystemConfig(ApplicationContext context){
+ public static void initSystemConfig(ApplicationContext context) {
//鍔犺浇閰嶇疆鏂囦欢锛屾敞鍐岃鍗曞鐞嗕睛鍚�
try {
ApplicationContextFactory.setApplicationContext(context);
env = context.getEnvironment();
String logSwitch = env.getProperty("LogSwitch");
- if(!StringUtil.isEmpty(logSwitch)){
+ if (!StringUtil.isEmpty(logSwitch)) {
//璁剧疆鏃ュ織绾у埆
- LogAgent.setLogSwatch(logSwitch);
+ SystemLogDto.setLogSwatch(logSwitch);
}
- }
- catch (Exception ex) {
+ } catch (Exception ex) {
throw new IllegalStateException("绯荤粺鍒濆鍖栧け璐�", ex);
}
}
+ public static void preInitSystemConfig() {
+ //鍔犺浇閰嶇疆鏂囦欢锛屾敞鍐岃鍗曞鐞嗕睛鍚�
+ String logSwitch = System.getenv("LogSwitch");
+ if (!StringUtil.isEmpty(logSwitch)) {
+ //璁剧疆鏃ュ織绾у埆
+ SystemLogDto.setLogSwatch(logSwitch);
+ }
+ }
+
}
--
Gitblit v1.8.0