Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Revert "Remove the use of the decorator..."
Browse files Browse the repository at this point in the history
This reverts commit 7261dc5.
  • Loading branch information
dazoakley committed Jan 27, 2015
1 parent 7261dc5 commit 6393f43
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/bandiera.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def logger

def statsd
@statsd ||= begin
if ENV['STATSD_HOST'] && ENV['STATSD_PORT'] && ENV['RACK_ENV'] == 'production'
if ENV['STATSD_HOST'] && ENV['STATSD_PORT']
build_statsd_client
else
require 'macmillan/utils/statsd_stub'
Expand All @@ -48,11 +48,17 @@ def statsd

def build_statsd_client
require 'statsd-ruby'
require 'macmillan/utils/statsd_decorator'

statsd = Statsd.new(ENV['STATSD_HOST'], ENV['STATSD_PORT'])
statsd.namespace = statsd_namespace
decd_statsd = Macmillan::Utils::StatsdDecorator.new(statsd, ENV['RACK_ENV'], logger)

statsd
logger.error(statsd.inspect)
logger.error(decd_statsd.inspect)
logger.error(ENV.inspect)

decd_statsd
end

def statsd_namespace
Expand Down

0 comments on commit 6393f43

Please sign in to comment.