NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class BackoffLogger

Logs backoff retries triggered from the BackoffPlugin

Format your log messages using a template that can contain template substitutions found in `Guzzle\Log\MessageFormatter`. In addition to the default template substitutions, there is also:

- retries: The number of times the request has been retried
- delay: The amount of time the request is being delayed

  Guzzle\Plugin\Backoff\BackoffLogger implements Symfony\Component\EventDispatcher\EventSubscriberInterface

Namespace: Guzzle\Plugin\Backoff
Located at Guzzle/Plugin/Backoff/BackoffLogger.php

## Methods summary

- `public` `__construct ( Guzzle\Log\LogAdapterInterface $logger, Guzzle\Log\MessageFormatter $formatter = null )`
- `public static` `getSubscribedEvents ( )`
- `public` `setTemplate ( string $template )`

  Set the template to use for logging

- `public` `onRequestRetry ( Guzzle\Common\Event $event )`

  Called when a request is being retried

## Methods detail

# `public`
`__construct( `Guzzle\Log\LogAdapterInterface` $logger, `Guzzle\Log\MessageFormatter` $formatter = null )`

#### Parameters

$logger
  ``Guzzle\Log\LogAdapterInterface``
  $logger Logger used to log the retries
$formatter
  ``Guzzle\Log\MessageFormatter``
  $formatter Formatter used to format log messages

# `public static`
`getSubscribedEvents( )`
# `public `Guzzle\Plugin\Backoff\BackoffLogger``
`setTemplate( string $template )`

Set the template to use for logging

#### Parameters

$template
  `string`
  $template Log message template

#### Returns

``Guzzle\Plugin\Backoff\BackoffLogger``
# `public`
`onRequestRetry( `Guzzle\Common\Event` $event )`

Called when a request is being retried

#### Parameters

$event
  ``Guzzle\Common\Event``
  $event Event emitted

### Magic methods summary

## Constants summary

`string` | `DEFAULT_FORMAT` | `'[{ts}] {method} {url} - {code} {phrase} - Retries: {retries}, Delay: {delay}, Time: {connect_time}, {total_time}, cURL: {curl_code} {curl_error}'` | # Default log message template

## Properties summary

`protected `Guzzle\Log\LogAdapterInterface`` | $logger | # Logger used to log retries
`protected `Guzzle\Log\MessageFormatter`` | $formatter | # Formatter used to format log messages