natefinch / lumberjack

lumberjack is a log rolling package for Go
MIT License
4.76k stars 585 forks source link

It can not re-create log file if deleted when app is running on macOS #144

Open oyljerry opened 2 years ago

oyljerry commented 2 years ago

Hi.
I using this lib with logrus to writing log files on macOS.
When my app is running, and I manually delete the log file, even my app is running and write log message, The log file is not created. If I restart my app, The log file will be generated.
I want that we my app is running, if log file is deleted, my app can write new debug message into log file.
Please help to check and fix this issue, Thanks.

natefinch commented 2 years ago

I mean, yeah, don't delete the file. This is probably something we could handle, and recreate it, though.

Kaspiman commented 11 months ago

Hello @natefinch, is there updates for this issue?

panziqun commented 6 months ago

@natefinch 如果服务长时间没有产生日志被自动清理了也会有这个问题

maxwelmunthe19 commented 6 months ago

Hello @natefinch, is there updates for this issue?