Class: RubyApp::Log::Formatter

Inherits:
Logger::Formatter
  • Object
show all
Defined in:
lib/ruby_app/log.rb

Instance Method Summary collapse

Instance Method Details

#call(severity, time, application, message) ⇒ Object



21
22
23
# File 'lib/ruby_app/log.rb', line 21

def call(severity, time, application, message)
  return "#{severity.ljust(5, ' ')} | #{time.strftime('%Y-%m-%d %H:%M:%S %Z')} | #{Socket.gethostname} | #{Process.pid} | #{RubyApp::Session.exists? ? RubyApp::Session.session_id : '                       '} | #{message}\n"
end