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

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

Direct Known Subclasses

WithoutTimestamp

Instance Method Summary collapse

Instance Method Details

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



80
81
82
83
84
# File 'lib/wurk/logger.rb', line 80

def call(severity, time, _program_name, message)
  # One literal, not two joined by `\`: Ruby builds each half of a
  # continued string and then a third to join them.
  "#{SEVERITY_COLORS[severity]} #{time.utc.iso8601(3)} #{pid_tag} tid=#{tid}#{format_context}: #{message}\n"
end