module Roma::Logging::RLogger::ExtCheckShift

Private Instance Methods

check_shift_log() click to toggle source
   # File lib/roma/logging/rlogger.rb
66 def check_shift_log
67   if @shift_age.is_a?(Integer)
68     # Note: always returns false if '0'.
69     if @filename && (@shift_age > 0) && (@dev.stat.size > @shift_size)
70       lock_shift_log { shift_log_age }
71     end
72   else
73     now = Time.now
74     period_end = previous_period_end(now)
75     if @dev.stat.mtime.to_i <= period_end.to_i
76       lock_shift_log { shift_log_period(period_end) }
77     end
78   end
79 end