You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I am trying this configuration with log4rs 1.3.0 with tail -f logs/test.log on a separate terminal, the tail command stops updating after log rotation, I think I have encountered this before in some other setups and it seem to have something to do with the file descriptor got changed or didn't change, or log rotation is not implemented with truncating logs/test.log in place instead. I wonder what it is causing it or there is a setting to make it work like apache's rotatelog utils.
for other use cases when I pipe the log to apache's rotatelogs like this, rotatelogs -n 5 logs/test.log 1M, tail -f continues to receive logs after rotation.
Not sure which behavior is industry standard. I have worked with python before and I don't remember if python allows you to specify rotatelogs behavior. For the mean time I just workaround by using tail -F instead.
When I am trying this configuration with log4rs 1.3.0 with
tail -f logs/test.log
on a separate terminal, the tail command stops updating after log rotation, I think I have encountered this before in some other setups and it seem to have something to do with the file descriptor got changed or didn't change, or log rotation is not implemented with truncatinglogs/test.log
in place instead. I wonder what it is causing it or there is a setting to make it work like apache's rotatelog utils.for other use cases when I pipe the log to apache's rotatelogs like this,
rotatelogs -n 5 logs/test.log 1M
, tail -f continues to receive logs after rotation.Not sure which behavior is industry standard. I have worked with python before and I don't remember if python allows you to specify
rotatelogs
behavior. For the mean time I just workaround by usingtail -F
instead.The text was updated successfully, but these errors were encountered: