Sha256: b081e7c54309ea28533a47be3e248e3298521ec2ebf8a7db2b3587f828a660fe

Contents?: true

Size: 584 Bytes

Versions: 30

Compression:

Stored size: 584 Bytes

Contents

module Timber
  # Base class for `Timber::Probes::*`.
  # @private
  class Probe
    class RequirementNotMetError < StandardError; end

    class << self
      def insert!(*args)
        new(*args).insert!
        Config.instance.logger.debug("Inserted probe #{name}")
        true
      # RequirementUnsatisfiedError is the only silent failure we support
      rescue RequirementNotMetError => e
        Config.instance.logger.debug("Failed inserting probe #{name}: #{e.message}")
        false
      end
    end

    def insert!
      raise NotImplementedError.new
    end
  end
end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
timber-1.1.14 lib/timber/probe.rb
timber-1.1.13 lib/timber/probe.rb
timber-1.1.12 lib/timber/probe.rb
timber-1.1.11 lib/timber/probe.rb
timber-1.1.10 lib/timber/probe.rb
timber-1.1.9 lib/timber/probe.rb
timber-1.1.8 lib/timber/probe.rb
timber-1.1.7 lib/timber/probe.rb
timber-1.1.6 lib/timber/probe.rb
timber-1.1.5 lib/timber/probe.rb
timber-1.1.4 lib/timber/probe.rb
timber-1.1.3 lib/timber/probe.rb
timber-1.1.2 lib/timber/probe.rb
timber-1.1.1 lib/timber/probe.rb
timber-1.1.0 lib/timber/probe.rb
timber-1.0.13 lib/timber/probe.rb
timber-1.0.12 lib/timber/probe.rb
timber-1.0.11 lib/timber/probe.rb
timber-1.0.10 lib/timber/probe.rb
timber-1.0.9 lib/timber/probe.rb