Phil Connell added the comment:
I'm not convinced that it matters whether the rename or move is atomic. Can
anyone come up with a quick concrete example?
I see two scenarios:
1. The process crashes during a copy in shutils.move(). In this case, some logs
will be duplicated across the files involved in the copy.
2. Other threads emit logs during the rollover. Given that the IO lock is
acquired in Handler.handle() before calling emit(), this is fine.
While the first case isn't ideal, I don't think there can be any loss of logs.
Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list