Class: Archfiend::Logging::DefaultFormatter

Inherits:
BaseFormatter show all
Defined in:
lib/archfiend/logging/default_formatter.rb

Overview

Simple formatter that includes both PID and a unique thread id

Constant Summary

Constants inherited from BaseFormatter

BaseFormatter::SEVERITY_STACK_ENTRIES_COUNT, BaseFormatter::STACK_ENTRIES_TO_SKIP

Instance Method Summary collapse

Instance Method Details

#call(severity, datetime, progname, msg) ⇒ Object



5
6
7
8
9
# File 'lib/archfiend/logging/default_formatter.rb', line 5

def call(severity, datetime, progname, msg)
  description, _backtrace = description_and_backtrace(severity, msg)

  "#{datetime.utc.iso8601(3)} #{::Process.pid} TID-#{tid} #{severity} -- #{progname}: #{description}\n"
end