def levels_cache
      @_levels_cache ||= begin
        new_cache = Hash.new do |hash, key|
          hash[key] = level_for_context(key)
        end
        self.levels.each { |k, v| new_cache[k] = v }
        # Ensure there is always a default fallback
        new_cache[nil] = :info unless new_cache.include?(nil)
        new_cache
      end
    end
def levels_cache
      @_levels_cache ||= begin
        new_cache = Hash.new do |hash, key|
          hash[key] = level_for_context(key)
        end
        self.levels.each { |k, v| new_cache[k] = v }
        # Ensure there is always a default fallback
        new_cache[nil] = :info unless new_cache.include?(nil)
        new_cache
      end
    end
Internal: Returns a lazily duplicated Hash from the levels Hash which is
 used to store the calculated logging level for specific contexts to make
 subsequent lookups more efficient.