|
@@ -6,13 +6,13 @@ import (
|
|
)
|
|
)
|
|
|
|
|
|
func NewGlobalLogger() {
|
|
func NewGlobalLogger() {
|
|
- var conf Config
|
|
|
|
|
|
+ var conf PackageConfig
|
|
logrus.SetFormatter(&logrus.TextFormatter{TimestampFormat: "2006/01/02 15:04:05", FullTimestamp: true})
|
|
logrus.SetFormatter(&logrus.TextFormatter{TimestampFormat: "2006/01/02 15:04:05", FullTimestamp: true})
|
|
config.ParseViperConfig(&conf, config.AddViperConfig("logging"))
|
|
config.ParseViperConfig(&conf, config.AddViperConfig("logging"))
|
|
conf.setConfigLogLevel()
|
|
conf.setConfigLogLevel()
|
|
}
|
|
}
|
|
|
|
|
|
-func (conf *Config) setConfigLogLevel() {
|
|
|
|
|
|
+func (conf *PackageConfig) setConfigLogLevel() {
|
|
logLevel, err := logrus.ParseLevel(conf.LogLevel)
|
|
logLevel, err := logrus.ParseLevel(conf.LogLevel)
|
|
if err != nil {
|
|
if err != nil {
|
|
logrus.SetLevel(logrus.FatalLevel)
|
|
logrus.SetLevel(logrus.FatalLevel)
|