增加close file code

This commit is contained in:
kingecg 2023-12-13 23:07:32 +08:00
parent a6aaaa7495
commit 20e440f79d
1 changed files with 1 additions and 0 deletions

View File

@ -27,6 +27,7 @@ func (f *FileAppender) start() {
}
go func() {
defer f.file.Close()
for {
logEvent := <-f.lchan
logMsg := format(logEvent)