class Logger
def with_level(severity)
logger.debug { "Hello" }
logger.with_level(:debug) do
Adjust the log level during the block execution for the current Fiber only
def with_level(severity) prev, level_override[Fiber.current] = level, Severity.coerce(severity) begin yield ensure if prev level_override[Fiber.current] = prev else level_override.delete(Fiber.current) end end end