Sha256: c382f1474e08e994223f4d1430f36dfb7db54e6a86abf7cd9810b4bb1a88d828
Contents?: true
Size: 473 Bytes
Versions: 13
Compression:
Stored size: 473 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
13 entries across 13 versions & 1 rubygems