mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
11 lines
274 B
Ruby
11 lines
274 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Docs
|
|
class RequestSubscriber < Subscriber
|
|
self.namespace = 'request'
|
|
|
|
def response(event)
|
|
log "Request: #{format_url event.payload[:url]} [#{event.payload[:response].code}] [#{event.duration.round}ms]"
|
|
end
|
|
end
|
|
end
|