lib/falcon/verbose.rb in falcon-0.11.0 vs lib/falcon/verbose.rb in falcon-0.12.0
- old
+ new
@@ -38,15 +38,16 @@
def log(start_time, env, response, error)
duration = Time.now - start_time
request_method = env['REQUEST_METHOD']
request_path = env['PATH_INFO']
+ server_protocol = env['SERVER_PROTOCOL']
if response
status, headers, body = response
- @logger.info "#{request_method} #{request_path} -> #{status}; Content length #{headers.fetch('Content-Length', '-')} bytes; took #{duration} seconds"
+ @logger.info "#{request_method} #{request_path} #{server_protocol} -> #{status}; Content length #{headers.fetch('Content-Length', '-')} bytes; took #{duration} seconds"
else
- @logger.info "#{request_method} #{request_path} -> #{error}; took #{duration} seconds"
+ @logger.info "#{request_method} #{request_path} #{server_protocol} -> #{error}; took #{duration} seconds"
end
end
def call(env)
start_time = Time.now