新增系统设置接口

This commit is contained in:
wxb committed 2020-08-07 10:22:52 +08:00
commit 389d2970c0
150 files changed
+21555

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
package config
import "github.com/spf13/viper"
type Logger struct {
Path string
Level string
Stdout bool
EnabledBUS bool
EnabledREQ bool
EnabledDB bool
EnabledJOB bool `default:"false"`
}
func InitLog(cfg *viper.Viper) *Logger {
return &Logger{
Path: cfg.GetString("path"),
Level: cfg.GetString("level"),
Stdout: cfg.GetBool("stdout"),
EnabledBUS: cfg.GetBool("enabledbus"),
EnabledREQ: cfg.GetBool("enabledreq"),
EnabledDB: cfg.GetBool("enableddb"),
EnabledJOB: cfg.GetBool("enabledjob"),
}
}
var LoggerConfig = new(Logger)