Skip to content

Commit

Permalink
option to silence logs
Browse files Browse the repository at this point in the history
  • Loading branch information
cice committed Dec 13, 2011
1 parent 0cf2193 commit 5735f16
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/clever_elements/railtie.rb
Expand Up @@ -6,6 +6,10 @@ class Railtie < Rails::Railtie
if File.exists?(config_file)
configuration = YAML.load_file config_file
configuration = configuration[Rails.env.to_s]

if configuration['quiet']
Savon.logger = HTTPI.logger = Logger.new(File.open('/dev/null', 'w'))
end

client = CleverElements::Client.new *configuration.values_at('user_id', 'api_key', 'mode')
CleverElements::Model.proxy = client.proxy
Expand Down

0 comments on commit 5735f16

Please sign in to comment.