Module: Evrone::CI::Common::TaggedLogging

Defined in:
lib/evrone/ci/common/tagged_logging.rb

Defined Under Namespace

Classes: Formatter

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(logger) ⇒ Object



59
60
61
62
63
# File 'lib/evrone/ci/common/tagged_logging.rb', line 59

def self.new(logger)
  # Ensure we set a default formatter so we aren't extending nil!
  logger.formatter = Formatter.new
  logger.extend(self)
end

Instance Method Details

#flushObject



75
76
77
78
# File 'lib/evrone/ci/common/tagged_logging.rb', line 75

def flush
  clear_tags!
  super if defined?(super)
end

#tagged(*tags) ⇒ Object



71
72
73
# File 'lib/evrone/ci/common/tagged_logging.rb', line 71

def tagged(*tags)
  formatter.tagged(*tags) { yield self }
end