Class: Marlowe::SimpleFormatter

Inherits:
ActiveSupport::Logger::SimpleFormatter
  • Object
show all
Defined in:
lib/marlowe/simple_formatter.rb

Overview

Marlowe::SimpleFormatter is a subclass of ActiveSupport::Logger::SimpleFormatter 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/simple_formatter.rb', line 10

def call(severity, timestamp, progname, msg)
  "[#{RequestStore.store[:correlation_id]}] #{super}"
end