Sha256: 4c4f3b1ae4cb2518f770446d0b496c56553608dcb34bd20d1114f0c9eeebf08e

Contents?: true

Size: 494 Bytes

Versions: 1

Compression:

Stored size: 494 Bytes

Contents

module Timber
  module Contexts
    # Generica HTTP response shared across all platforms.
    class HTTPResponse < Context
      ROOT_KEY = :http_response.freeze
      VERSION = 1.freeze

      private
        def json_payload
          @json_payload ||= Macros::DeepMerger.merge({
            # order is relevant for logfmt styling
            :status => status,
            :headers => headers.as_json,
            :time_ms => time_ms
          }, super).freeze
        end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
timberio-1.0.0.beta1 lib/timber/contexts/http_response.rb