module ActiveSupport::TaggedLogging::Formatter

def call(severity, timestamp, progname, msg)

This method is invoked when a log event occurs.
:nodoc:
def call(severity, timestamp, progname, msg)
  super(severity, timestamp, progname, tag_stack.format_message(msg))
end

def clear_tags!

def clear_tags!
  tag_stack.clear
end

def current_tags

def current_tags
  tag_stack.tags
end

def pop_tags(count = 1)

def pop_tags(count = 1)
  tag_stack.pop_tags(count)
end

def push_tags(*tags)

def push_tags(*tags)
  tag_stack.push_tags(tags)
end

def tag_stack

def tag_stack
  # We use our object ID here to avoid conflicting with other instances
  @thread_key ||= "activesupport_tagged_logging_tags:#{object_id}"
  IsolatedExecutionState[@thread_key] ||= TagStack.new
end

def tagged(*tags)

def tagged(*tags)
  pushed_count = tag_stack.push_tags(tags).size
  yield self
ensure
  pop_tags(pushed_count)
end

def tags_text

def tags_text
  tag_stack.format_message("")
end