Class: Wurk::Logger::Formatters::Pretty

Inherits:
Base
  • Object
show all
Defined in:
lib/wurk/logger.rb

Direct Known Subclasses

WithoutTimestamp

Constant Summary

Constants inherited from Base

Base::SEVERITY_COLORS

Instance Method Summary collapse

Methods inherited from Base

#format_context, #tid

Instance Method Details

#call(severity, time, _program_name, message) ⇒ Object



42
43
44
45
# File 'lib/wurk/logger.rb', line 42

def call(severity, time, _program_name, message)
  "#{SEVERITY_COLORS[severity]} #{time.utc.iso8601(3)} pid=#{::Process.pid} " \
    "tid=#{tid}#{format_context}: #{message}\n"
end