Sha256: 3f1d768c4d19f1d8f4901df05f34596c89975f1042380223ea4b56265acb7473

Contents?: true

Size: 271 Bytes

Versions: 8

Compression:

Stored size: 271 Bytes

Contents

module StatsD::Instrument::Backends
  class LoggerBackend < StatsD::Instrument::Backend
    
    attr_accessor :logger
    
    def initialize(logger)
      @logger = logger
    end

    def collect_metric(metric)
      logger.info "[StatsD] #{metric}"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
statsd-instrument-2.0.5 lib/statsd/instrument/backends/logger_backend.rb
statsd-instrument-2.0.4 lib/statsd/instrument/backends/logger_backend.rb
statsd-instrument-2.0.3 lib/statsd/instrument/backends/logger_backend.rb
statsd-instrument-2.0.2 lib/statsd/instrument/backends/logger_backend.rb
statsd-instrument-2.0.1 lib/statsd/instrument/backends/logger_backend.rb
statsd-instrument-2.0.0 lib/statsd/instrument/backends/logger_backend.rb
statsd-instrument-2.0.0beta2 lib/statsd/instrument/backends/logger_backend.rb
statsd-instrument-2.0.0beta lib/statsd/instrument/backends/logger_backend.rb