Sha256: 208d8772325b60f9a3027f7a71899c3caee928bfb6b79d723bb899ab8e5903cd

Contents?: true

Size: 417 Bytes

Versions: 4

Compression:

Stored size: 417 Bytes

Contents

# frozen_string_literal: true

require "active_support/tagged_logging"

ActiveSupport::TaggedLogging::Formatter.prepend(Module.new {
  def current_tags
    thread_key = @thread_key ||= "activesupport_tagged_logging_tags:#{object_id}"
    unless Thread.current.thread_variable_get(thread_key)
      Thread.current.thread_variable_set(thread_key, [])
    end
    Thread.current.thread_variable_get(thread_key)
  end
})

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dry-effects-0.4.0 lib/dry/effects/extensions/active_support/tagged_logging.rb
dry-effects-0.3.1 lib/dry/effects/extensions/active_support/tagged_logging.rb
dry-effects-0.3.0 lib/dry/effects/extensions/active_support/tagged_logging.rb
dry-effects-0.2.0 lib/dry/effects/extensions/active_support/tagged_logging.rb