Sha256: dfbd06e8e05aca2eb354a0c3aec8261f9619b41cba2bdb3705f831a4b1684701

Contents?: true

Size: 532 Bytes

Versions: 28

Compression:

Stored size: 532 Bytes

Contents

# This Railtie runs some initializers that will set the logger to <tt>Rails#logger</tt>,
# and will initialize the {StatsD#backend} based on the Rails environment.
#
# @see StatsD::Instrument::Environment
class StatsD::Instrument::Railtie < Rails::Railtie

  initializer 'statsd-instrument.use_rails_logger' do
    ::StatsD.logger = Rails.logger
  end

  initializer 'statsd-instrument.setup_backend', after: 'statsd-instrument.use_rails_logger' do
    ::StatsD.backend = ::StatsD::Instrument::Environment.default_backend
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
qubole-statsd-instrument-2.1.6 lib/statsd/instrument/railtie.rb
statsd-instrument-2.3.5 lib/statsd/instrument/railtie.rb
statsd-instrument-2.3.4 lib/statsd/instrument/railtie.rb
qubole-statsd-instrument-2.1.5 lib/statsd/instrument/railtie.rb
statsd-instrument-2.3.2 lib/statsd/instrument/railtie.rb
statsd-instrument-2.3.1 lib/statsd/instrument/railtie.rb
qubole-statsd-instrument-2.1.4 lib/statsd/instrument/railtie.rb
statsd-instrument-2.3.0 lib/statsd/instrument/railtie.rb
statsd-instrument-2.3.0.beta6 lib/statsd/instrument/railtie.rb
statsd-instrument-2.3.0.beta5 lib/statsd/instrument/railtie.rb
statsd-instrument-2.3.0.beta4 lib/statsd/instrument/railtie.rb
statsd-instrument-2.3.0.beta3 lib/statsd/instrument/railtie.rb
statsd-instrument-2.3.0.beta2 lib/statsd/instrument/railtie.rb
statsd-instrument-2.3.0.beta lib/statsd/instrument/railtie.rb
statsd-instrument-2.2.1 lib/statsd/instrument/railtie.rb
statsd-instrument-2.2.0 lib/statsd/instrument/railtie.rb
statsd-instrument-2.1.4 lib/statsd/instrument/railtie.rb
statsd-instrument-2.1.3 lib/statsd/instrument/railtie.rb
statsd-instrument-2.1.2 lib/statsd/instrument/railtie.rb
statsd-instrument-2.1.1 lib/statsd/instrument/railtie.rb