Commit 220742d20105133b3c0799e7099ff58a8276aaa4

Authored by Christian Teijon
1 parent 629b7858
Exists in master

Require syslog/logger only when it's needed

Showing 1 changed file with 1 additions and 2 deletions   Show diff stats
config/environment.rb
1 -require 'syslog/logger'  
2 -  
3 # Load the Rails application. 1 # Load the Rails application.
4 require File.expand_path('../application', __FILE__) 2 require File.expand_path('../application', __FILE__)
5 3
@@ -9,6 +7,7 @@ require Rails.root.join('config/load') @@ -9,6 +7,7 @@ require Rails.root.join('config/load')
9 if Errbit::Config.log_location == 'STDOUT' 7 if Errbit::Config.log_location == 'STDOUT'
10 Rails.logger = ActiveSupport::Logger.new STDOUT 8 Rails.logger = ActiveSupport::Logger.new STDOUT
11 elsif Errbit::Config.log_location == 'Syslog::Logger' 9 elsif Errbit::Config.log_location == 'Syslog::Logger'
  10 + require 'syslog/logger'
12 Rails.logger = Syslog::Logger.new('errbit', Syslog::LOG_LOCAL0) 11 Rails.logger = Syslog::Logger.new('errbit', Syslog::LOG_LOCAL0)
13 else 12 else
14 Rails.logger = ActiveSupport::Logger.new Errbit::Config.log_location 13 Rails.logger = ActiveSupport::Logger.new Errbit::Config.log_location