method
shift_log_period
shift_log_period(now)
private
Hide source
# File lib/logger.rb, line 582 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