Module: Sinatra::Log

Defined in:
lib/herbert/Log.rb

Defined Under Namespace

Modules: Extension

Instance Method Summary collapse

Instance Method Details

#log_requestObject



3
4
5
# File 'lib/herbert/Log.rb', line 3

def log_request
  ::Herbert::AppLogger.log(request, response) if settings.log_requests
end

#timer_elapsedObject



7
8
9
# File 'lib/herbert/Log.rb', line 7

def timer_elapsed
  return (@timer_stop.to_f - @timer_start.to_f)*100
end