Class: Marlowe::Formatter

Inherits:
ActiveSupport::Logger::Formatter
  • Object
show all
Defined in:
lib/marlowe/formatter.rb

Overview

Marlowe::Formatter is a subclass of ActiveSupport::Logger::Formatter that adds a correlation id string to a rails log.

Instance Method Summary collapse

Instance Method Details

#call(_severity, _timestamp, _progname, _msg) ⇒ Object

Overrides the formatter return to add the correlation id.


10
11
12
# File 'lib/marlowe/formatter.rb', line 10

def call(_severity, _timestamp, _progname, _msg)
  "[#{RequestStore.store[:correlation_id]}] #{super}"
end