Sha256: 030dcfa1494265666fd41d39b3357a16ddd1474b7175271a80b92b78bed25abe
Contents?: true
Size: 440 Bytes
Versions: 1
Compression:
Stored size: 440 Bytes
Contents
require 'request_store' module Marlowe # Marlowe::SimpleFormatter is a subclass of # +ActiveSupport::Logger::SimpleFormatter+ that adds a correlation id # string to a rails log. class SimpleFormatter < ActiveSupport::Logger::SimpleFormatter # Overrides the formatter return to add the correlation id. def call(severity, timestamp, progname, msg) "[#{RequestStore.store[:correlation_id]}] #{super}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
marlowe-2.0 | lib/marlowe/simple_formatter.rb |