method

shift_log_period

v1_8_6_287 - Show latest stable - Class: Logger::LogDevice
shift_log_period(now)
private

No documentation available.

# File lib/logger.rb, line 565
    def shift_log_period(now)
      postfix = previous_period_end(now).strftime("%Y%m%d")     # YYYYMMDD
      age_file = "#{@filename}.#{postfix}"
      if FileTest.exist?(age_file)
        raise RuntimeError.new("'#{ age_file }' already exists.")
      end
      @dev.close
      File.rename("#{@filename}", age_file)
      @dev = create_logfile(@filename)
      return true
    end