lib/heavylog.rb in heavylog-0.0.22 vs lib/heavylog.rb in heavylog-0.0.23
- old
+ new
@@ -15,11 +15,11 @@
module_function
TRUNCATION = "[TRUNCATED]"
ANSI_REGEX = /\e\[(\d+)m/.freeze
- mattr_accessor :logger, :application, :formatter, :log_level
+ mattr_accessor :logger, :application, :formatter, :log_level, :ignore_path
def setup(app)
self.application = app
patch_loggers
attach_to_action_controller
@@ -41,20 +41,21 @@
Heavylog.logger = ActiveSupport::Logger.new(f)
end
Heavylog.formatter = config.formatter || Heavylog::Formatters::Raw.new
Heavylog.log_level = config.log_level || :info
+ Heavylog.ignore_path = config.ignore_path || nil
end
def attach_to_action_controller
Heavylog::LogSubscriber.attach_to :action_controller
end
def attach_to_sidekiq
return unless config.log_sidekiq
Sidekiq.configure_server do |config|
- config.options[:job_logger] = SidekiqLogger
+ config.job_logger = SidekiqLogger
end
Sidekiq.error_handlers << SidekiqExceptionHandler.new
end