lib/logtail-rails/logger.rb in logtail-rails-0.2.2 vs lib/logtail-rails/logger.rb in logtail-rails-0.2.3
- old
+ new
@@ -30,9 +30,18 @@
io_device = Logtail::LogDevices::HTTP.new(source_token)
else
io_device = STDOUT
end
- self.create_logger(io_device)
+ logger = self.create_logger(io_device)
+
+ if defined?(Sidekiq)
+ Sidekiq.configure_server do |config|
+ logger = self.create_logger(io_device, config.logger) if config.logger.class == Sidekiq::Logger
+ config.logger = logger
+ end
+ end
+
+ logger
end
end
end