class EIVO::Formatter
Public Instance Methods
call(severity, timestamp, progname, message)
click to toggle source
# File lib/eivo-rails/formatter.rb, line 8 def call(severity, timestamp, progname, message) json = { pid: $PROCESS_ID, level: severity, timestamp: timestamp.utc.iso8601(3), message: message } if progname json[:tag] = progname end if defined?(::Sidekiq) context = ::Sidekiq::Context.current if !context.empty? json[:context] = context end end MultiJson.dump(json) << "\n" end