class Logger::LogDevice

def initialize(log = nil, shift_age: nil, shift_size: nil, shift_period_suffix: nil, binmode: false)

def initialize(log = nil, shift_age: nil, shift_size: nil, shift_period_suffix: nil, binmode: false)
  @dev = @filename = @shift_age = @shift_size = @shift_period_suffix = nil
  @binmode = binmode
  mon_initialize
  set_dev(log)
  if @filename
    @shift_age = shift_age || 7
    @shift_size = shift_size || 1048576
    @shift_period_suffix = shift_period_suffix || '%Y%m%d'
    unless @shift_age.is_a?(Integer)
      base_time = @dev.respond_to?(:stat) ? @dev.stat.mtime : Time.now
      @next_rotate_time = next_rotate_time(base_time, @shift_age)
    end
  end
end