Sha256: 02d69280aea1a0e3fda64708dcde9a9ed1b3a83facceae96537e6ffbe546032a

Contents?: true

Size: 1.07 KB

Versions: 1062

Compression:

Stored size: 1.07 KB

Contents

module Seahorse
  module Client
    module Plugins

      # Enables logging for all requests.  This plugin allows you to configure
      # your logging device, the log format and the level to log messages at.
      #
      # @see Logging::Formatter
      #
      # @seahorse.client.option [Logger] :logger (nil) The Logger instance
      #   to send log messages to.  If this option is not set, logging
      #   will be disabled.
      #
      # @seahorse.client.option [Symbol] :log_level (:info) The log level
      #   to send messages to the logger at.
      #
      # @seahorse.client.option [Logging::LogFormatter] :log_formatter The log
      #   formatter.  Defaults to {Seahorse::Client::Logging::Formatter.default}.
      #
      class Logging < Plugin

        option(:logger, nil)

        option(:log_level, :info)

        option(:log_formatter, Client::Logging::Formatter.default)

        def add_handlers(handlers, config)
          if config.logger
            handlers.add(Client::Logging::Handler, step: :validate)
          end
        end

      end
    end
  end
end

Version data entries

1,062 entries across 1,062 versions & 2 rubygems

Version Path
aws-sdk-core-2.11.632 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.631 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.630 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.629 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.628 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.627 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.626 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.625 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.624 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.623 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.622 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.621 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.620 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.619 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.618 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.617 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.616 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.615 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.614 lib/seahorse/client/plugins/logging.rb
aws-sdk-core-2.11.613 lib/seahorse/client/plugins/logging.rb