Sha256: 060ac3f177cd2cf566d3fa05f884c1271e8e99111bc0726219438bd93ad116db
Contents?: true
Size: 565 Bytes
Versions: 4
Compression:
Stored size: 565 Bytes
Contents
module WebValve module Instrumentation class LogSubscriber < ActiveSupport::LogSubscriber def request(event) return unless logger.debug? status = event.payload[:status] method = event.payload[:method].to_s.upcase url = event.payload[:url] host = event.payload[:host] name = '%s %s (%.1fms)' % ["WebValve", "Request Captured", event.duration] details = "#{host} #{method} #{url} [#{status}]" debug " #{color(name, YELLOW, true)} #{color(details, BOLD, true)}" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems