natefinch / lumberjack

lumberjack is a log rolling package for Go
MIT License
4.79k stars 591 forks source link

Stop mill goroutine when logger is closed #80

Open nmiyake opened 5 years ago

nmiyake commented 5 years ago

Fixes #56

natefinch commented 5 years ago

Awesome, thank you.

bmoylan commented 5 years ago

Hey @natefinch mind taking a look at this?

howbazaar commented 4 years ago

There is a problem of retrency here. The current behaviour of the Logger is that if Close is called, and you do another Write, the file is reopened, but the milling no longer works.

I proposed my own fix to this #100 before I realised there were a number of other PRs to address the issue. My final implementation uses a similar wait group approach to yours.

abhi8086 commented 3 years ago

Hi @natefinch / team I am using lumberjack for one of our systems since last week and it's working great. However facing this issue from 3 days where goroutines are increasing continuously.

image

I believe it's related with this issue. Any suggestions on mitigating this issue.

current lumberjack goroutine count is 243.