improve: 支持通过 flag 开启 debug 模式

This commit is contained in:
Mmx233
2023-06-01 18:36:39 +08:00
parent 4d4926add6
commit e895e6fe1d
2 changed files with 5 additions and 0 deletions

View File

@@ -11,6 +11,9 @@ import (
)
func initLog() {
if Flags.Debug {
Config.Settings.Log.DebugLevel = true
}
if Config.Settings.Log.DebugLevel {
log.SetLevel(log.DebugLevel)
}