Class: Relaton::Logger::FormatterString

Inherits:
Logger::Formatter
  • Object
show all
Defined in:
lib/relaton/logger/formatter_string.rb

Instance Method Summary collapse

Instance Method Details

#call(severity, _datetime, progname, msg, **args) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/relaton/logger/formatter_string.rb', line 3

def call(severity, _datetime, progname, msg, **args)
  output = []
  output << "[#{progname}]" if progname
  output << "#{severity}:"
  output << "(#{args[:key]})" if args[:key]
  output << "#{msg}\n"
  output.join " "
end