lib/logstasher.rb in logstasher-0.8.2 vs lib/logstasher.rb in logstasher-0.8.5

- old
+ new

@@ -13,11 +13,11 @@ extend self STORE_KEY = :logstasher_data REQUEST_CONTEXT_KEY = :logstasher_request_context attr_accessor :logger, :logger_path, :enabled, :log_controller_parameters, :source, :backtrace, - :delayed_jobs_support, :controller_monkey_patch + :controller_monkey_patch # Setting the default to 'unknown' to define the default behaviour @source = 'unknown' # By default log the backtrace of exceptions @backtrace = true @@ -94,11 +94,10 @@ def setup(config) # Path instrumentation class to insert our hook if (! config.controller_monkey_patch && config.controller_monkey_patch != false) || config.controller_monkey_patch == true require 'logstasher/rails_ext/action_controller/metal/instrumentation' end - self.delayed_plugin(config) self.suppress_app_logs(config) self.logger_path = config.logger_path || "#{Rails.root}/log/logstash_#{Rails.env}.log" self.logger = config.logger || new_logger(self.logger_path) self.logger.level = config.log_level || Logger::WARN self.source = config.source unless config.source.nil? @@ -120,16 +119,9 @@ File.basename($0) == 'rake' end def called_as_console? defined?(Rails::Console) && true || false - end - - def delayed_plugin(config) - if config.delayed_jobs_support || false - require 'logstasher/delayed/plugin' - ::Delayed::Worker.plugins << ::LogStasher::Delayed::Plugin - end end def suppress_app_logs(config) if configured_to_suppress_app_logs?(config) require 'logstasher/rails_ext/rack/logger'