Module: Ezlog::LogContextHelper
- Included in:
- Ezlog, Rails::AccessLog, Rails::RequestLogContext, Sidekiq::DeathLogger, Sidekiq::ErrorLogger, Sidekiq::JobLogger
- Defined in:
- lib/ezlog/log_context_helper.rb
Instance Method Summary collapse
Instance Method Details
#add_to_log_context(context) ⇒ Object
10 11 12 |
# File 'lib/ezlog/log_context_helper.rb', line 10 def add_to_log_context(context) Logging.mdc.update context end |
#within_log_context(context) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/ezlog/log_context_helper.rb', line 3 def within_log_context(context) Logging.mdc.push context yield ensure Logging.mdc.pop end |