From 944705062c0d422c669ac4d5e8ee363ebd16c6b5 Mon Sep 17 00:00:00 2001 From: niushuai233 Date: Fri, 28 Oct 2022 16:03:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=9D=E5=A7=8B=E5=8C=96=E6=97=B6?= =?UTF-8?q?=E5=86=99=E5=85=A5config=E5=88=B0=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cc/niushuai/project/devcontrol/base/App.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/base/App.java b/app/src/main/java/cc/niushuai/project/devcontrol/base/App.java index 652bfcb..701ebad 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/base/App.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/base/App.java @@ -127,17 +127,23 @@ public class App { if (null != switchConfig) { XLog.SWITCH = Boolean.valueOf(switchConfig.getValue()); XLog.SWITCH_FOR_FILE = Boolean.valueOf(switchConfig.getValue()); + } else { + DBHelper.configInsert(Keys.SETUP_LOG_SWITCH, Boolean.TRUE.toString()); } SysConfig levelConfig = DBHelper.configOneByKey(Keys.SETUP_LOG_LEVEL); if (null != levelConfig) { XLog.ROOT_LEVEL = XLog.Level.transform(levelConfig.getValue()); XLog.ROOT_LEVEL_NAME = XLog.Level.transform(XLog.ROOT_LEVEL); + } else { + DBHelper.configInsert(Keys.SETUP_LOG_LEVEL, XLog.Level.transform(XLog.ROOT_LEVEL)); } SysConfig keepDayConfig = DBHelper.configOneByKey(Keys.SETUP_LOG_KEEP_DAY); if (null != keepDayConfig) { XLog.KEEP_DAY = Integer.valueOf(keepDayConfig.getValue()); + } else { + DBHelper.configInsert(Keys.SETUP_LOG_KEEP_DAY, XLog.KEEP_DAY.toString()); } // 初始化日志路径