feat:update log

This commit is contained in:
wenjianzhang committed 2020-07-24 18:10:25 +08:00
1 parent 0768efbcb3
commit f3adadd6ef
20 files changed
+194 -146

No files matched your search

+7
View File
@@ -13,6 +13,7 @@ type Application struct {
DemoMsg string
Domain string
IsHttps bool
Logger *Logger
}
func InitApplication(cfg *viper.Viper) *Application {
@@ -27,6 +28,12 @@ func InitApplication(cfg *viper.Viper) *Application {
DemoMsg: cfg.GetString("demoMsg"),
Domain: cfg.GetString("domain"),
IsHttps: cfg.GetBool("ishttps"),
Logger: &Logger{
Path: cfg.GetString("logger.path"),
Level: cfg.GetString("logger.level"),
Stdout: cfg.GetBool("logger.stdout"),
Enabled: cfg.GetBool("logger.enabled"),
},
}
}