Sha256: 04d5634745b39b6125f0ea7c380bfdb759797ba86247444de03543e6e3c9b6a0

Contents?: true

Size: 521 Bytes

Versions: 7

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

7 entries across 7 versions & 1 rubygems

Version Path
getaround_utils-0.2.14 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.13 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.11 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.10 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.9 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.7 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.6 lib/getaround_utils/ougai/deep_key_value_formatter.rb