Class: CustomRequestLogger::Formatter

Inherits:
Logger::Formatter
  • Object
show all
Defined in:
lib/pineapples/templates/lib/logging/custom_request_logger.rb

Instance Method Summary collapse

Instance Method Details

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



52
53
54
55
# File 'lib/pineapples/templates/lib/logging/custom_request_logger.rb', line 52

def call(severity, time, progname, msg)
  msg = msg.is_a?(String) ? msg : msg.inspect
  "#{Rails.env.production? ? severity : ''} #{time.utc.strftime('%F %T')} #{msg} \n"
end