Reduce unnecessary rename operations in prerotateSingleLog()#450
Reduce unnecessary rename operations in prerotateSingleLog()#450edycm wants to merge 1 commit intologrotate:masterfrom
Conversation
|
Thanks for the patch! The existing code copes better with the case where |
|
Actually the patch changes logrotate's behavior even when the @cgzones, should we rather use |
|
We should probably define how logrotate should behave if the Currently if test.log and test.log.0 exist and rotation is done with config it results in and afterwards only test.log.1 exists (with the content of test.log) and the rotated test.log.0 got lost. If we don't care about preexisting files then this optimization (although probably not noticeable in practice) seems OK. |
|
Right. My proposal is not really an improvement. Not touching |
config file:
before fixing:
after fixing: