Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct (LogAdapterInterface $logAdapter, $formatter=null, $wireBodies=false) | |
onCurlRead (Event $event) | |
onCurlWrite (Event $event) | |
onRequestBeforeSend (Event $event) | |
onRequestSent (Event $event) | |
Static Public Member Functions | |
static | getDebugPlugin ($wireBodies=true, $stream=null) |
static | getSubscribedEvents () |
Protected Attributes | |
$formatter | |
$logAdapter | |
$wireBodies | |
Plugin class that will add request and response logging to an HTTP request.
The log plugin uses a message formatter that allows custom messages via template variable substitution.
Definition at line 20 of file LogPlugin.php.
Guzzle\Plugin\Log\LogPlugin::__construct | ( | LogAdapterInterface | $logAdapter, |
$formatter = null , |
|||
$wireBodies = false |
|||
) |
LogAdapterInterface | $logAdapter | Adapter object used to log message |
string | MessageFormatter | $formatter | Formatter used to format log messages or the formatter template |
bool | $wireBodies | Set to true to track request and response bodies using a temporary buffer if the bodies are not repeatable. |
Definition at line 46 of file LogPlugin.php.
References Guzzle\Plugin\Log\LogPlugin\$formatter, Guzzle\Plugin\Log\LogPlugin\$logAdapter, and Guzzle\Plugin\Log\LogPlugin\$wireBodies.
|
static |
Get a log plugin that outputs full request, response, and curl error information to stderr
bool | $wireBodies | Set to false to disable request/response body output when they use are not repeatable |
resource | $stream | Stream to write to when logging. Defaults to STDERR when it is available |
Definition at line 64 of file LogPlugin.php.
References Guzzle\Plugin\Log\LogPlugin\$wireBodies.
Referenced by Guzzle\Tests\Plugin\Log\LogPluginTest\testHasHelpfulStaticFactoryMethod().
|
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 79 of file LogPlugin.php.
Guzzle\Plugin\Log\LogPlugin::onCurlRead | ( | Event | $event | ) |
Event triggered when curl data is read from a request
Event | $event |
Definition at line 94 of file LogPlugin.php.
Guzzle\Plugin\Log\LogPlugin::onCurlWrite | ( | Event | $event | ) |
Event triggered when curl data is written to a response
Event | $event |
Definition at line 107 of file LogPlugin.php.
Guzzle\Plugin\Log\LogPlugin::onRequestBeforeSend | ( | Event | $event | ) |
Called before a request is sent
Event | $event |
Definition at line 120 of file LogPlugin.php.
References Guzzle\Http\EntityBody\factory(), and Guzzle\Http\Message\EntityEnclosingRequestInterface\getBody().
Guzzle\Plugin\Log\LogPlugin::onRequestSent | ( | Event | $event | ) |
Triggers the actual log write when a request completes
Event | $event |
Definition at line 145 of file LogPlugin.php.
|
protected |
Formatter used to format messages before logging
Definition at line 32 of file LogPlugin.php.
Referenced by Guzzle\Plugin\Log\LogPlugin\__construct().
|
protected |
Adapter responsible for writing log data
Definition at line 26 of file LogPlugin.php.
Referenced by Guzzle\Plugin\Log\LogPlugin\__construct().
|
protected |
Whether or not to wire request and response bodies
Definition at line 38 of file LogPlugin.php.
Referenced by Guzzle\Plugin\Log\LogPlugin\__construct(), and Guzzle\Plugin\Log\LogPlugin\getDebugPlugin().