Sha256: 07af597a5776a440fc6275cf444a36db56272574041da8a6ac9b8d2634877564
Contents?: true
Size: 472 Bytes
Versions: 1
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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
getaround_utils-0.2.14 | lib/getaround_utils/ougai/json_formatter.rb |