lib/logstasher.rb in logstasher-0.2.5 vs lib/logstasher.rb in logstasher-0.2.8

- old
+ new

@@ -54,13 +54,18 @@ self.logger.level = app.config.logstasher.log_level || Logger::WARN self.enabled = true end def self.suppress_app_logs(app) - if app.config.logstasher.supress_app_log.nil? || app.config.logstasher.supress_app_log + if configured_to_suppress_app_logs?(app) require 'logstasher/rails_ext/rack/logger' LogStasher.remove_existing_log_subscriptions end + end + + def self.configured_to_suppress_app_logs?(app) + # This supports both spellings: "suppress_app_log" and "supress_app_log" + !!(app.config.logstasher.suppress_app_log.nil? ? app.config.logstasher.supress_app_log : app.config.logstasher.suppress_app_log) end def self.custom_fields Thread.current[:logstasher_custom_fields] ||= [] end