Sha256: 9915c1aa7f9d7e4c4b1e72f8396cd34cbe9353c47ff258990898a91550aeb1ba
Contents?: true
Size: 430 Bytes
Versions: 1
Compression:
Stored size: 430 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) message = data.delete(:msg) data[:message] = message if message != 'No message' 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.1 | lib/getaround_utils/ougai/json_formatter.rb |