Sha256: 8bda8551d7f7b30c5b8b64780bf940dc81205a6024ca35e7e8e574d250c8da41

Contents?: true

Size: 522 Bytes

Versions: 13

Compression:

Stored size: 522 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

13 entries across 13 versions & 1 rubygems

Version Path
getaround_utils-0.2.34 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.33 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.32 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.31 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.29 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.28 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.27 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.26 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.25 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.24 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.23 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.22 lib/getaround_utils/ougai/deep_key_value_formatter.rb
getaround_utils-0.2.21 lib/getaround_utils/ougai/deep_key_value_formatter.rb