class Logger::LogDevice
def check_shift_log
def check_shift_log if @shift_age.is_a?(Integer) # Note: always returns false if '0'. if @filename && (@shift_age > 0) && (@dev.stat.size > @shift_size) lock_shift_log { shift_log_age } end 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)) } end end end