feat : update config

This commit is contained in:
zhangwenjian
2020-07-27 22:34:01 +08:00
parent 2b92b100e3
commit 7e12e55b56
5 changed files with 36 additions and 38 deletions
+6 -2
View File
@@ -6,15 +6,19 @@ type Logger struct {
Path string
Level string
Stdout bool
Enabled bool
EnabledBUS bool
EnabledREQ bool
EnabledDB bool
}
func InitLog(cfg *viper.Viper) *Logger {
return &Logger{
Path: cfg.GetString("path"),
Level: cfg.GetString("level"),
Enabled: cfg.GetBool("enabled"),
Stdout: cfg.GetBool("stdout"),
EnabledBUS: cfg.GetBool("enabledbus"),
EnabledREQ: cfg.GetBool("enabledreq"),
EnabledDB: cfg.GetBool("enableddb"),
}
}