Class: Sidecloq::Utils::ContextLogger
- Inherits:
-
Object
- Object
- Sidecloq::Utils::ContextLogger
- Defined in:
- lib/sidecloq/utils.rb
Instance Method Summary collapse
-
#initialize(ctx) ⇒ ContextLogger
constructor
A new instance of ContextLogger.
- #method_missing(meth, *args) ⇒ Object
Constructor Details
#initialize(ctx) ⇒ ContextLogger
Returns a new instance of ContextLogger.
4 5 6 |
# File 'lib/sidecloq/utils.rb', line 4 def initialize(ctx) @context = ctx end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
8 9 10 11 12 |
# File 'lib/sidecloq/utils.rb', line 8 def method_missing(meth, *args) Sidekiq::Logging.with_context(@context) do Sidekiq.logger.send(meth, args) end end |