class Lumberjack::Device::DateRollingLogFile

def initialize(path, options = {})

Parameters:
  • options (Hash) -- The options for the device.
  • path (String, Pathname) -- The path to the log file.
def initialize(path, options = {})
  @manual = options[:manual]
  @file_date = Date.today
  if options[:roll]&.to_s&.match(/(daily)|(weekly)|(monthly)/i)
    @roll_period = $~[0].downcase.to_sym
    options.delete(:roll)
  else
    raise ArgumentError.new("illegal value for :roll (#{options[:roll].inspect})")
  end
  super
end