natefinch / lumberjack

lumberjack is a log rolling package for Go
MIT License
4.87k stars 600 forks source link

Open Telemetry drops logs when renamed #209

Open scr-oath opened 7 months ago

scr-oath commented 7 months ago

One possible solution to support Open Telemetry's filelogreceiver would be to have a mode more like go-cronowriter by writing directly to the current "backup file" and having Filename be a symlink to it. If this were done, then Open Telemetry could watch the backup files by a glob and would neither lose any lines written to the file which were not consumed before rotation, nor double-count lines if including the Filename in the glob.

phuslu commented 4 months ago

https://github.com/natefinch/lumberjack/issues/115#issuecomment-739835573