|
|
@ -41,8 +41,14 @@ func init() { |
|
|
|
) |
|
|
|
|
|
|
|
log.Println("config file name -->", ConfigFile) |
|
|
|
log.Println("starting ...") |
|
|
|
if _, err := toml.DecodeFile(ConfigFile, &logCfg); err != nil { |
|
|
|
log.Fatalf("Read config file err:%s", err.Error()) |
|
|
|
//log.Fatalf("Read config file err:%s", err.Error())
|
|
|
|
log.Println("failed to open config file") |
|
|
|
if err = InitLog(""); nil != err { |
|
|
|
log.Println(err.Error()) |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
cfg = logCfg.Logs |
|
|
|
|
|
|
|