Class: Hpe3parSdk::CustomFormatter

Inherits:
Logger::Formatter
  • Object
show all
Defined in:
lib/Hpe3parSdk/multi_log.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

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



62
63
64
65
66
# File 'lib/Hpe3parSdk/multi_log.rb', line 62

def call(severity, datetime, progname, msg)
  # msg2str is the internal helper that handles different msgs correctly
  date_format = datetime.strftime('%Y-%m-%d %H:%M:%S%z')
  "[#{date_format} ##{Process.pid}] [#{progname}] #{severity} -- : "+ msg.join($/) + "#{$/}"
end