vendor/bundle/ruby/2.6.0/gems/lumberjack-1.2.8/lib/lumberjack/logger.rb
def tag(tags, &block)
      tags = Tags.stringify_keys(tags)
      thread_tags = thread_local_value(:lumberjack_logger_tags)
      if block
        merged_tags = (thread_tags ? thread_tags.merge(tags) : tags.dup)
        push_thread_local_value(:lumberjack_logger_tags, merged_tags, &block)
      elsif thread_tags
        thread_tags.merge!(tags)
        nil
      else
        @tags.merge!(tags)
        nil
      end
    end
# Set a hash of tags on logger. If a block is given, the tags will only be set
# for the duration of the block. If this method is called inside such a block,
# the tags will only be defined on the tags in that block. When the parent block
# exits, all the tags will be reverted. If there is no block, then the tags will
# be defined as global and apply to all log statements.
Set a hash of tags on logger. If a block is given, the tags will only be set
for the duration of the block. If this method is called inside such a block,
the tags will only be defined on the tags in that block. When the parent block
exits, all the tags will be reverted. If there is no block, then the tags will
be defined as global and apply to all log statements.
Set a hash of tags on logger . If a block is given the tags will only be set for the duration of the block . If this method is called inside such a block the tags will only be defined on the tags in that block . When the parent block exits all the tags will be reverted . If there is no block then the tags will be defined as global and apply to all log statements .
def tag(tags, &block)
      tags = Tags.stringify_keys(tags)
      thread_tags = thread_local_value(:lumberjack_logger_tags)
      if block
        merged_tags = (thread_tags ? thread_tags.merge(tags) : tags.dup)
        push_thread_local_value(:lumberjack_logger_tags, merged_tags, &block)
      elsif thread_tags
        thread_tags.merge!(tags)
        nil
      else
        @tags.merge!(tags)
        nil
      end
    end
def tag ( tags , & block ) tags = Tags . stringify_keys ( tags ) thread_tags = thread_local_value ( :lumberjack_logger_tags ) if block merged_tags = ( thread_tags ? thread_tags . merge ( tags ) : tags . dup ) push_thread_local_value ( :lumberjack_logger_tags , merged_tags , & block ) elsif thread_tags thread_tags . merge! ( tags ) nil else @tags . merge! ( tags ) nil end end
Set a hash of tags on logger.
Set a hash of tags on logger .
tags
block