mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 02:04:09 +00:00
feat : update config
This commit is contained in:
@@ -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"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user