class Seahorse::Client::Logging::Formatter

A log formatter receives a {Response} object and return a log message as a string. When you construct a {Formatter}, you provide a pattern string with substitutions.

pattern = ':operation :http_response_status_code :time'
formatter = Seahorse::Client::Logging::Formatter.new(pattern)
formatter.format(response)
#=> 'get_bucket 200 0.0352'

# Canned Formatters

Instead of providing your own pattern, you can choose a canned log formatter.

# Pattern Substitutions

You can put any of these placeholders into you pattern.

* `:client_class` - The name of the client class.

* `:operation` - The name of the client request method.

* `:request_params` - The user provided request parameters. Long
  strings are truncated/summarized if they exceed the
  {#max_string_size}.  Other objects are inspected.

* `:time` - The total time in seconds spent on the
  request.  This includes client side time spent building
  the request and parsing the response.

* `:retries` - The number of times a client request was retried.

* `:http_request_method` - The http request verb, e.g., `POST`,
  `PUT`, `GET`, etc.

* `:http_request_endpoint` - The request endpoint.  This includes
   the scheme, host and port, but not the path.

* `:http_request_scheme` - This is replaced by `http` or `https`.

* `:http_request_host` - The host name of the http request
  endpoint (e.g. 's3.amazon.com').

* `:http_request_port` - The port number (e.g. '443' or '80').

* `:http_request_headers` - The http request headers, inspected.

* `:http_request_body` - The http request payload.

* `:http_response_status_code` - The http response status
  code, e.g., `200`, `404`, `500`, etc.

* `:http_response_headers` - The http response headers, inspected.

* `:http_response_body` - The http response body contents.

* `:error_class`

* `:error_message`