Sha256: c962079116818d06cfc6947b8d04fe7e7d74b1bfb7c964a12af2f5934be5c21b

Contents?: true

Size: 471 Bytes

Versions: 2

Compression:

Stored size: 471 Bytes

Contents

require 'alephant/logger'

module Alephant
  module Publisher
    module Request
      module LogHelper
        include Logger
        def log_error_with_metric(e, method, message, metric = nil, metric_count = 1)
          logger.error "Publisher::Request::#{method}: '#{e.class}(#{e.message})' exception raised for: #{message}"
          logger.metric(:name => metric, :unit => "Count", :value => metric_count) unless metric.nil?
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alephant-publisher-request-0.2.4 lib/alephant/publisher/request/log_helper.rb
alephant-publisher-request-0.2.3 lib/alephant/publisher/request/log_helper.rb