module Lumberjack
def use_context(context, &block)
-
(Object)
- The result of the block.
Parameters:
-
context
(Lumberjack::Context
) -- The context to use within the block.
def use_context(context, &block) current_context = Thread.current[:lumberjack_context] begin Thread.current[:lumberjack_context] = (context || Context.new) yield ensure Thread.current[:lumberjack_context] = current_context end end