lager
lager copied to clipboard
Log file cannot be reopened after rotation
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.
#493 adds code for the undefined
case which I suspect fixes this issue.
@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.