module ActiveSupport::LoggerThreadSafeLevel

def log_at(level)

Change the thread-local level for the duration of the given block.
def log_at(level)
  old_local_level, self.local_level = local_level, level
  yield
ensure
  self.local_level = old_local_level
end