Module: Loga::TaggedLogging::Formatter
- Included in:
- Formatters::GELFFormatter, Formatters::SimpleFormatter
- Defined in:
- lib/loga/tagged_logging.rb
Overview
:nodoc:
Instance Method Summary collapse
- #clear_tags! ⇒ Object
- #current_tags ⇒ Object
- #pop_tags(size = 1) ⇒ Object
- #push_tags(*tags) ⇒ Object
- #tagged(*tags) ⇒ Object
Instance Method Details
#clear_tags! ⇒ Object
42 43 44 |
# File 'lib/loga/tagged_logging.rb', line 42 def .clear end |
#current_tags ⇒ Object
46 47 48 |
# File 'lib/loga/tagged_logging.rb', line 46 def Thread.current[:loga_tagged_logging_tags] ||= [] end |
#pop_tags(size = 1) ⇒ Object
38 39 40 |
# File 'lib/loga/tagged_logging.rb', line 38 def (size = 1) .pop size end |
#push_tags(*tags) ⇒ Object
32 33 34 35 36 |
# File 'lib/loga/tagged_logging.rb', line 32 def (*) .flatten.reject(&:blank?).tap do || .concat end end |
#tagged(*tags) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/loga/tagged_logging.rb', line 25 def tagged(*) = (*) yield self ensure (.size) end |