Sha256: b9a8f97c938def2a4d408d901527cda9baa7b99e3a07dd5b1e769fd1d74d990c
Contents?: true
Size: 472 Bytes
Versions: 5
Compression:
Stored size: 472 Bytes
Contents
# frozen_string_literal: true require 'ougai' require 'json' module GetaroundUtils; end module GetaroundUtils::Ougai; end class GetaroundUtils::Ougai::JsonFormatter < Ougai::Formatters::Base def _call(severity, _time, progname, data) message = data.delete(:msg) data = { caption: message }.merge(data) \ unless message == 'No message' payload = { severity: severity, progname: progname }.merge(data).compact "#{JSON.dump(payload)}\n" end end
Version data entries
5 entries across 5 versions & 1 rubygems