lib/falcon/verbose.rb in falcon-0.17.0 vs lib/falcon/verbose.rb in falcon-0.17.1

- old
+ new

@@ -32,12 +32,15 @@ def annotate(request) task = Async::Task.current address = request.remote_address @logger.debug(request.authority) {"#{request.method} #{request.path} #{request.version} from #{address.inspect}"} - # @logger.debug(request.authority) {request.headers.inspect} + # if ENV['REQUEST_HEADERS'] + # @logger.debug(request.authority) {request.headers.inspect} + # end + task.annotate("#{request.method} #{request.path} from #{address.inspect}") end def call(request) annotate(request) @@ -46,10 +49,14 @@ response = super statistics.wrap(response) do |statistics, error| @logger.info(request.authority) {"#{request.method} #{request.path} #{request.version} -> #{response.status}; #{statistics.inspect}"} - # @logger.info response.headers.inspect + + # if ENV['RESPONSE_HEADERS'] + # @logger.info response.headers.inspect + # end + @logger.error(request.authority) {"#{error.class}: #{error.message}"} if error end return response end