lib/falcon/middleware/verbose.rb
# Log details of the incoming request using {annotate} and wrap the response to log response details too.
Log details of the incoming request using {annotate} and wrap the response to log response details too.
Log details of the incoming request using { annotate } and wrap the response to log response details too .
def call(request)
				annotate(request)
				statistics = Async::HTTP::Statistics.start
				response = super
				statistics.wrap(response) do |statistics, error|
					@logger.info(request) {"Responding with: #{response.status} #{response.headers.to_h}; #{statistics.inspect}"}
					@logger.error(request) {"#{error.class}: #{error.message}"} if error
				end
				return response
			end
def call ( request ) annotate ( request ) statistics = Async :: HTTP :: Statistics . start response = super statistics . wrap ( response ) do | statistics , error | @logger . info ( request ) { "Responding with: #{response.status} #{response.headers.to_h}; #{statistics.inspect}" } @logger . error ( request ) { "#{error.class}: #{error.message}" } if error end return response end
Log details of the incoming request using {annotate} and wrap the response to log response details too.
Log details of the incoming request using { annotate } and wrap the response to log response details too .
request
<not_specific>