Class: Keepclean::Formatter

Inherits:
Logger::Formatter
  • Object
show all
Includes:
ActiveSupport::TaggedLogging::Formatter
Defined in:
lib/keepclean/formatter.rb

Instance Method Summary collapse

Instance Method Details

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



8
9
10
11
12
# File 'lib/keepclean/formatter.rb', line 8

def call(severity, timestamp, progname, msg)
  (String === msg ? msg : msg.inspect).split("\n").map do |line|
    "%s %s[%s] %s%s: %s\n" % [Time.at(timestamp).strftime("%b %e %H:%M:%S"), Keepclean.project_name, Keepclean.build_id, tags_text, severity, line]
  end.join
end