class XLogger::Formatter

Public Instance Methods

call(severity, time, progname, msg) click to toggle source
# File lib/bin_script/xlogger.rb, line 30
def call(severity, time, progname, msg)
  if severity == 'INFO' && msg.nil?
    # use this if you want a simple blank line without date in your logs:
    # just call a logger.info without any params
    "\n"
  else
    format_datetime(time) << " " <<  msg2str(msg) << "\n"
  end
end