class Terraspace::Logger::Formatter

Public Instance Methods

call(severity, time, progname, msg) click to toggle source
# File lib/terraspace/logger/formatter.rb, line 3
def call(severity, time, progname, msg)
  # careful changing the format. All::Summary uses a regexp on this format to remove the timestamp
  "[#{format_datetime(time)} ##{Process.pid} #{progname}]: #{msg}"
end

Private Instance Methods

format_datetime(time) click to toggle source
# File lib/terraspace/logger/formatter.rb, line 9
def format_datetime(time)
  time.strftime("%Y-%m-%dT%H:%M:%S")
end