class Shoryuken::Logging::Pretty

Public Instance Methods

call(severity, time, _program_name, message) click to toggle source

Provide a call() method that returns the formatted message.

# File lib/shoryuken/logging.rb, line 8
def call(severity, time, _program_name, message)
  "#{time.utc.iso8601} #{Process.pid} TID-#{Thread.current.object_id.to_s(36)}#{context} #{severity}: #{message}\n"
end
context() click to toggle source
# File lib/shoryuken/logging.rb, line 12
def context
  c = Thread.current[:shoryuken_context]
  c ? " #{c}" : ''
end