Sha256: de557c18d4142996ad84a95d126bc7cd35c653f0e3b64aaae15977898e668a6f
Contents?: true
Size: 450 Bytes
Versions: 1
Compression:
Stored size: 450 Bytes
Contents
# frozen_string_literal: true require 'json' module GetaroundUtils; end module GetaroundUtils::Ougai; end class GetaroundUtils::Ougai::JsonFormatter < Ougai::Formatters::Base def _call(severity, _time, progname, data) data.delete(:msg) if data[:msg] == 'No message' data = data.except(:msg).merge(message: data[:msg]) payload = { severity: severity, progname: progname }.merge(data).compact! JSON.dump(payload) + "\n" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
getaround_utils-0.2.0 | lib/getaround_utils/ougai/json_formatter.rb |