Sha256: b00b9dfb57cfd6d89a6599d10122c37f3a875aef5cddecd5b840908ef422292f
Contents?: true
Size: 456 Bytes
Versions: 7
Compression:
Stored size: 456 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 = { 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
7 entries across 7 versions & 1 rubygems