lager icon indicating copy to clipboard operation
lager copied to clipboard

Log file cannot be reopened after rotation

Open dwest1975 opened this issue 5 years ago • 2 comments

After changes in 8d7eecda49d13b87a28efd5fb7f77185be263515 if count is set to 0 the log file can never be opened again. The reason for this is that inode of the original file is reused (we just wipe the contents), but the original file is closed (fd is undefined in the state). So ensure_logfile() cannot open the file.

I suppose ensure_logfile() can be amended with a few guards for patterns of "case Inode == Inode2 of" expression.

dwest1975 avatar Jan 02 '19 15:01 dwest1975

#493 adds code for the undefined case which I suspect fixes this issue.

lukebakken avatar Mar 13 '19 14:03 lukebakken

@dwest1975 would you mind re-testing with the latest version of lager?

@mrallen1 if we don't get a response in a week I think this issue can be closed.

lukebakken avatar Oct 14 '19 16:10 lukebakken