lib/logjam_agent/railtie.rb in logjam_agent-0.5.2 vs lib/logjam_agent/railtie.rb in logjam_agent-0.5.3

- old
+ new

@@ -12,10 +12,10 @@ initializer "initialize_logjam_agent_logger", :before => :initialize_logger do |app| Rails.logger ||= app.config.logger || begin rails_version = Rails::VERSION::STRING paths = app.config.paths - path = (rails_version < "3.2" ? paths.log.to_a : paths['log']).first.to_s + path = (rails_version < "3.1" ? paths.log.to_a : paths['log']).first.to_s logger = LogjamAgent::BufferedLogger.new(path) logger.level = ActiveSupport::BufferedLogger.const_get(app.config.log_level.to_s.upcase) logger.formatter = LogjamAgent::SyslogLikeFormatter.new logger.auto_flushing = false if Rails.env.production? && rails_version < "3.2" logger