Sha256: f2befd9960c43f0387f73fc085ef1024a454eaf0baa28992843d929c565fdf0c

Contents?: true

Size: 521 Bytes

Versions: 5

Compression:

Stored size: 521 Bytes

Contents

# frozen_string_literal: true

require 'ougai'
require 'getaround_utils/utils/deep_key_value'

module GetaroundUtils; end
module GetaroundUtils::Ougai; end

class GetaroundUtils::Ougai::DeepKeyValueFormatter < 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
    "#{GetaroundUtils::Utils::DeepKeyValue.serialize(payload)}\n"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
getaround_utils-0.2.20 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.19 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.18 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.16 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.15 lib/getaround_utils/ougai/deep_key_value_formatter.rb