Class: EventHub::LoggerProxy
- Inherits:
-
Object
- Object
- EventHub::LoggerProxy
- Defined in:
- lib/eventhub/logger.rb
Overview
Logger proxy that automatically includes correlation_id in structured log output
Instance Method Summary collapse
-
#initialize(logger) ⇒ LoggerProxy
constructor
A new instance of LoggerProxy.
- #method_missing(method, *args, &block) ⇒ Object
- #respond_to_missing?(method, include_private = false) ⇒ Boolean
Constructor Details
#initialize(logger) ⇒ LoggerProxy
Returns a new instance of LoggerProxy.
5 6 7 |
# File 'lib/eventhub/logger.rb', line 5 def initialize(logger) @logger = logger end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
25 26 27 |
# File 'lib/eventhub/logger.rb', line 25 def method_missing(method, *args, &block) @logger.send(method, *args, &block) end |
Instance Method Details
#respond_to_missing?(method, include_private = false) ⇒ Boolean
29 30 31 |
# File 'lib/eventhub/logger.rb', line 29 def respond_to_missing?(method, include_private = false) @logger.respond_to?(method, include_private) end |