method
check_shift_log
v2_1_10 -
Show latest stable
- Class:
Logger::LogDevice
check_shift_log()private
No documentation available.
# File lib/logger.rb, line 621
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
period_end = previous_period_end(now)
if @dev.stat.mtime <= period_end
lock_shift_log { shift_log_period(period_end) }
end
end
end