natefinch / lumberjack

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

Create new log file for test if it was removed #52

Closed tsvvladimir closed 2 years ago

tsvvladimir commented 7 years ago

User could delete file for log. I think that logger should create new file in this case to provide continuous logging.

levelasquez commented 3 years ago

Hello,

I have an issue #121 that could be solved with this feature.

Could be reconsidered?

Thanks :)

natefinch commented 2 years ago

There's a better way to do this - instead of doing an os.Stat each time, just try the write, and if it fails because the file is gone, handle the failure by making a new file.

Kaspiman commented 1 year ago

@tsvvladimir @natefinch Hello! Any chance to see this fix in the next release?