Sha256: 69c43ebee3d3da86cbc9d2b4c0cb22c6de81ada8cb02fbc4d25e8dda2124a916
Contents?: true
Size: 641 Bytes
Versions: 68
Compression:
Stored size: 641 Bytes
Contents
# frozen_string_literal: true require 'active_support/log_subscriber' module Proscenium class LogSubscriber < ActiveSupport::LogSubscriber def sideload(event) info do " [Proscenium] Side loaded #{event.payload[:identifier]}" end end def build(event) path = event.payload[:identifier] path = CGI.unescape(path) if path.start_with?(/https?%3A%2F%2F/) info do message = +"[Proscenium] Building #{path}" message << " (Duration: #{event.duration.round(1)}ms | Allocations: #{event.allocations})" end end end end Proscenium::LogSubscriber.attach_to :proscenium
Version data entries
68 entries across 68 versions & 1 rubygems