close all existing loggers before re-initilizing loggers. fixes #2533

This commit is contained in:
woodsaj
2015-08-17 15:59:40 +08:00
parent ad1fa110ff
commit c138f390ac
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -456,6 +456,8 @@ var logLevels = map[string]int{
}
func initLogging(args *CommandLineArgs) {
//close any existing log handlers.
log.Close()
// Get and check log mode.
LogModes = strings.Split(Cfg.Section("log").Key("mode").MustString("console"), ",")
LogsPath = makeAbsolute(Cfg.Section("paths").Key("logs").String(), HomePath)