Sha256: c6d144eafb19df7cae5b6a818f455d7a36823e0c9576ce3541ffacfbc1e92e27

Contents?: true

Size: 943 Bytes

Versions: 163

Compression:

Stored size: 943 Bytes

Contents

module Seahorse
  module Client
    # @deprecated Use Aws::Logging instead.
    # @api private
    module Logging
      class Handler < Client::Handler

        # @param [RequestContext] context
        # @return [Response]
        def call(context)
          context[:logging_started_at] = Time.now
          @handler.call(context).tap do |response|
            context[:logging_completed_at] = Time.now
            log(context.config, response)
          end
        end

        private

        # @param [Configuration] config
        # @param [Response] response
        # @return [void]
        def log(config, response)
          config.logger.send(config.log_level, format(config, response))
        end

        # @param [Configuration] config
        # @param [Response] response
        # @return [String]
        def format(config, response)
          config.log_formatter.format(response)
        end

      end
    end
  end
end

Version data entries

163 entries across 163 versions & 1 rubygems

Version Path
aws-sdk-core-3.100.0 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.99.2 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.99.1 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.99.0 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.98.0 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.97.1 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.97.0 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.96.1 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.96.0 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.95.0 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.94.1 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.94.0 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.93.0 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.92.0 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.91.1 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.91.0 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.90.1 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.90.0 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.89.1 lib/seahorse/client/logging/handler.rb
aws-sdk-core-3.89.0 lib/seahorse/client/logging/handler.rb