class Lumberjack::Device::DateRollingLogFile

def roll_file?

Returns:
  • (Boolean) -
def roll_file?
  if @manual
    true
  else
    date = Date.today
    if date.year > @file_date.year
      true
    elsif @roll_period == :daily && date.yday > @file_date.yday
      true
    elsif @roll_period == :weekly && date.cweek != @file_date.cweek
      true
    elsif @roll_period == :monthly && date.month > @file_date.month
      true
    else
      false
    end
  end
end