From c0592a768ae5adece535de9ff2e3d986ba5a6f06 Mon Sep 17 00:00:00 2001 From: Oskar Eichler <62393985+OskarEichler@users.noreply.github.com> Date: Sun, 30 Aug 2026 15:28:37 +0700 Subject: [PATCH] Retry periodic rotation after failures --- lib/logger/log_device.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/logger/log_device.rb b/lib/logger/log_device.rb index e16f3b7..fdaa8cb 100644 --- a/lib/logger/log_device.rb +++ b/lib/logger/log_device.rb @@ -168,8 +168,9 @@ def check_shift_log else now = Time.now if now >= @next_rotate_time - @next_rotate_time = next_rotate_time(now, @shift_age) - lock_shift_log { shift_log_period(previous_period_end(now, @shift_age)) } + if lock_shift_log { shift_log_period(previous_period_end(now, @shift_age)) } + @next_rotate_time = next_rotate_time(now, @shift_age) + end end end end