Module: ActiveSupport::TaggedLogging::Formatter
Do not use. This module is for internal use only.
Relationships & Source Files | |
Defined in: | activesupport/lib/active_support/tagged_logging.rb |
Instance Method Summary
-
#call(severity, timestamp, progname, msg)
This method is invoked when a log event occurs.
- #clear_tags!
- #current_tags
- #pop_tags(count = 1)
- #push_tags(*tags)
- #tag_stack
- #tagged(*tags)
- #tags_text
Instance Method Details
#call(severity, timestamp, progname, msg)
This method is invoked when a log event occurs.
# File 'activesupport/lib/active_support/tagged_logging.rb', line 32
def call(severity, , progname, msg) super(severity, , progname, tag_stack. (msg)) end
#clear_tags!
[ GitHub ]# File 'activesupport/lib/active_support/tagged_logging.rb', line 51
def tag_stack.clear end
#current_tags
[ GitHub ]# File 'activesupport/lib/active_support/tagged_logging.rb', line 61
def tag_stack. end
#pop_tags(count = 1)
[ GitHub ]# File 'activesupport/lib/active_support/tagged_logging.rb', line 47
def (count = 1) tag_stack. (count) end
#push_tags(*tags)
[ GitHub ]# File 'activesupport/lib/active_support/tagged_logging.rb', line 43
def (* ) tag_stack. ( ) end
#tag_stack
[ GitHub ]# File 'activesupport/lib/active_support/tagged_logging.rb', line 55
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
#tagged(*tags)
[ GitHub ]# File 'activesupport/lib/active_support/tagged_logging.rb', line 36
def tagged(* ) pushed_count = tag_stack. ( ).size yield self ensure (pushed_count) end
#tags_text
[ GitHub ]# File 'activesupport/lib/active_support/tagged_logging.rb', line 65
def tag_stack. ("") end