fix logger bug
This commit is contained in:
16
conf/new.go
16
conf/new.go
@@ -104,3 +104,19 @@ func CheckIP(ip string) string {
|
||||
}
|
||||
return ip
|
||||
}
|
||||
|
||||
// 初始化Logger配置
|
||||
func InitLoggerConf(cfg *LogConf) *LogConf {
|
||||
if cfg == nil {
|
||||
return &LogConf{
|
||||
Name: strings.ToLower(vars.ServiceKey),
|
||||
Level: vars.LogLevel(vars.DEBUG),
|
||||
Dir: cfg.Dir,
|
||||
Endpoint: cfg.Endpoint,
|
||||
Console: cfg.Console,
|
||||
File: cfg.File,
|
||||
Remote: cfg.Remote,
|
||||
}
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user