-
Notifications
You must be signed in to change notification settings - Fork 639
Open
Description
When the program only needs one Logger, it works fine; however, when the program needs multiple Loggers, or the Logger is dynamic, the millCh will not be released, resulting in a goroutine leak.
#57 #80 #100 There already see 3 issues, so as a general purpose log rotation library, why not fix this?
millCh never close
func (l *Logger) millRun() {
for range l.millCh {
// what am I going to do, log this?
_ = l.millRunOnce()
}
}
func (l *Logger) Close() error {
l.mu.Lock()
defer l.mu.Unlock()
return l.close()
}qqshka, Krovikan-Vamp, adityamaru and xuzhijvn
Metadata
Metadata
Assignees
Labels
No labels