Sha256: 05fbb5fea6fbd6ac94ff2347219276eb6660f89aae8e52ccd47b3a9d988b3b20

Contents?: true

Size: 595 Bytes

Versions: 21

Compression:

Stored size: 595 Bytes

Contents

require 'liquid/metrics/reporter'

module Metrics
  class LoggerReporter < Reporter

    def initialize(logger)
      super
      @logger = logger
      @marker = "metrics:"
    end

    def report_gauge(name, gauge)
      @logger.info(@marker, super)
    end

    def report_counter(name, counter)
      @logger.info(@marker, super)
    end

    def report_histogram(name, histogram)
      @logger.info(@marker, super)
    end

    def report_meter(name, meter)
      @logger.info(@marker, super)
    end

    def report_timer(name, timer)
      @logger.info(@marker, super)
    end

  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
liquid-ext-3.5.3 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.5.2 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.5.0 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.4.2 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.4.1 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.4.0 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.3.10 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.3.9 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.3.8 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.3.7 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.3.6 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.3.5 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.3.4 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.3.3 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.3.2 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.3.0 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.2.0 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.1.2 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.1.1 lib/liquid/metrics/logger_reporter.rb
liquid-ext-3.1.0 lib/liquid/metrics/logger_reporter.rb