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

View File

@@ -82,7 +82,11 @@ func Fatal(skip int, format string, v ...interface{}) {
func Close() {
for _, l := range loggers {
l.Close()
// delete the logger.
l = nil
}
// clear the loggers slice.
loggers = nil
}
// .___ __ _____