Sha256: 6eb6d9a9b492903c24d4af3e0dd06cd862d13490bfe953d9c80addc39eaa8f02

Contents?: true

Size: 649 Bytes

Versions: 4

Compression:

Stored size: 649 Bytes

Contents

# frozen_string_literal: true

require "dry/logger/formatters/structured"

module Dry
  module Logger
    module Formatters
      # Special handling of `:params` in the log entry payload
      #
      # @since 1.0.0
      # @api private
      #
      # @see String
      class Rack < String
        # @see String#initialize
        # @since 1.0.0
        # @api private
        def initialize(**options)
          super
          @template = Template[Logger.templates[:rack]]
        end

        # @api 1.0.0
        # @api private
        def format_params(value)
          return value unless value.empty?
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dry-logger-1.0.3 lib/dry/logger/formatters/rack.rb
dry-logger-1.0.2 lib/dry/logger/formatters/rack.rb
dry-logger-1.0.1 lib/dry/logger/formatters/rack.rb
dry-logger-1.0.0 lib/dry/logger/formatters/rack.rb