Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct (LogAdapterInterface $logger, MessageFormatter $formatter=null) | |
onRequestRetry (Event $event) | |
setTemplate ($template) | |
Static Public Member Functions | |
static | getSubscribedEvents () |
Data Fields | |
const | DEFAULT_FORMAT = '[{ts}] {method} {url} - {code} {phrase} - Retries: {retries}, Delay: {delay}, Time: {connect_time}, {total_time}, cURL: {curl_code} {curl_error}' |
Protected Attributes | |
$formatter | |
$logger | |
Logs backoff retries triggered from the BackoffPlugin
Format your log messages using a template that can contain template substitutions found in {
Definition at line 19 of file BackoffLogger.php.
Guzzle\Plugin\Backoff\BackoffLogger::__construct | ( | LogAdapterInterface | $logger, |
MessageFormatter | $formatter = null |
||
) |
LogAdapterInterface | $logger | Logger used to log the retries |
MessageFormatter | $formatter | Formatter used to format log messages |
Definition at line 40 of file BackoffLogger.php.
References Guzzle\Plugin\Backoff\BackoffLogger\$formatter, and Guzzle\Plugin\Backoff\BackoffLogger\$logger.
|
static |
Returns an array of event names this subscriber wants to listen to.
The array keys are event names and the value can be:
For instance:
Implements Symfony\Component\EventDispatcher\EventSubscriberInterface.
Definition at line 46 of file BackoffLogger.php.
References Guzzle\Plugin\Backoff\BackoffPlugin\RETRY_EVENT.
Referenced by Guzzle\Tests\Plugin\Backoff\BackoffLoggerTest\testHasEventList().
Guzzle\Plugin\Backoff\BackoffLogger::onRequestRetry | ( | Event | $event | ) |
Called when a request is being retried
Event | $event | Event emitted |
Definition at line 70 of file BackoffLogger.php.
Guzzle\Plugin\Backoff\BackoffLogger::setTemplate | ( | $template | ) |
Set the template to use for logging
string | $template | Log message template |
Definition at line 58 of file BackoffLogger.php.
|
protected |
Formatter used to format log messages
Definition at line 34 of file BackoffLogger.php.
Referenced by Guzzle\Plugin\Backoff\BackoffLogger\__construct().
|
protected |
Definition at line 28 of file BackoffLogger.php.
Referenced by Guzzle\Plugin\Backoff\BackoffLogger\__construct().
const Guzzle\Plugin\Backoff\BackoffLogger::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
Definition at line 23 of file BackoffLogger.php.