mirror of
https://github.com/niushuai233/DevControl.git
synced 2024-10-27 22:43:20 +08:00
fix: 初始化时写入config到数据库
This commit is contained in:
parent
6eea9d57ad
commit
944705062c
@ -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());
|
||||
}
|
||||
|
||||
// 初始化日志路径
|
||||
|
Loading…
x
Reference in New Issue
Block a user