Sha256: 2814f40e72fcf2e154b7df24ff897bf1cc5304df83f3d3ab750f67bf8cc1489a
Contents?: true
Size: 614 Bytes
Versions: 19
Compression:
Stored size: 614 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" require "fiber" module ActiveSupport module LoggerThreadSafeLevel # :nodoc: extend ActiveSupport::Concern def after_initialize @local_levels = Concurrent::Map.new(initial_capacity: 2) end def local_log_id Fiber.current.__id__ end def local_level @local_levels[local_log_id] end def local_level=(level) if level @local_levels[local_log_id] = level else @local_levels.delete(local_log_id) end end def level local_level || super end end end
Version data entries
19 entries across 19 versions & 2 rubygems