Class: PactBroker::Logging::DefaultFormatter
- Inherits:
-
SemanticLogger::Formatters::Default
- Object
- SemanticLogger::Formatters::Default
- PactBroker::Logging::DefaultFormatter
- Defined in:
- lib/pact_broker/logging/default_formatter.rb
Instance Method Summary collapse
- #call(log, _output) ⇒ Object
-
#initialize ⇒ DefaultFormatter
constructor
A new instance of DefaultFormatter.
Constructor Details
#initialize ⇒ DefaultFormatter
Returns a new instance of DefaultFormatter.
7 8 9 |
# File 'lib/pact_broker/logging/default_formatter.rb', line 7 def initialize @formatter = ::Logger::Formatter.new end |
Instance Method Details
#call(log, _output) ⇒ Object
11 12 13 14 15 |
# File 'lib/pact_broker/logging/default_formatter.rb', line 11 def call(log, _output) self.log = log self.logger = logger @formatter.call(log.level.upcase, log.time, nil, [, , duration, , payload, exception].compact.join(" ")) end |