lib/ezlog/railtie.rb in ezlog-0.10.1 vs lib/ezlog/railtie.rb in ezlog-0.10.2

- old
+ new

@@ -71,10 +71,12 @@ ::Sidekiq.logger = Ezlog.logger('Sidekiq') ::Sidekiq.logger.level = app.config.log_level ::Sidekiq.configure_server do |config| config.options[:job_logger] = Ezlog::Sidekiq::JobLogger config.error_handlers << Ezlog::Sidekiq::ErrorLogger.new - config.error_handlers.delete_if { |handler| handler.is_a? ::Sidekiq::ExceptionHandler::Logger } + if defined?(::Sidekiq::ExceptionHandler) && defined?(::Sidekiq::ExceptionHandler::Logger) + config.error_handlers.delete_if { |handler| handler.is_a? ::Sidekiq::ExceptionHandler::Logger } + end config.death_handlers << Ezlog::Sidekiq::DeathLogger.new end end def disable_rack_timeout_logging