lib/sidekiq-gelf.rb in sidekiq-gelf-0.0.2 vs lib/sidekiq-gelf.rb in sidekiq-gelf-1.0.0
- old
+ new
@@ -1,18 +1,21 @@
require 'logger'
require 'gelf'
require 'sidekiq'
-require 'sidekiq-gelf/formatter'
+require 'sidekiq-gelf/middleware'
module Sidekiq
module Logging
module GELF
extend self
def hook!(*args)
- Sidekiq::Logging.logger = ::GELF::Logger.new(*args)
- Sidekiq::Logging.logger.formatter = Formatter.new
+ Sidekiq.configure_server do |config|
+ config.server_middleware do |chain|
+ chain.add Middleware::Server::GELFLogging, *args
+ end
+ end
end
end
end
end
\ No newline at end of file