$logAdapter
$logAdapter : \Guzzle\Log\LogAdapterInterface
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.
$logAdapter : \Guzzle\Log\LogAdapterInterface
$formatter : \Guzzle\Log\MessageFormatter
__construct(\Guzzle\Log\LogAdapterInterface $logAdapter, string|\Guzzle\Log\MessageFormatter $formatter = null, boolean $wireBodies = false)
\Guzzle\Log\LogAdapterInterface | $logAdapter | Adapter object used to log message |
string|\Guzzle\Log\MessageFormatter | $formatter | Formatter used to format log messages or the formatter template |
boolean | $wireBodies | Set to true to track request and response bodies using a temporary buffer if the bodies are not repeatable. |
getDebugPlugin(boolean $wireBodies = true, resource $stream = null) : self
Get a log plugin that outputs full request, response, and curl error information to stderr
boolean | $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 |
getSubscribedEvents() : array
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:
The event names to listen to
onCurlRead(\Guzzle\Common\Event $event)
Event triggered when curl data is read from a request
\Guzzle\Common\Event | $event |
onCurlWrite(\Guzzle\Common\Event $event)
Event triggered when curl data is written to a response
\Guzzle\Common\Event | $event |
onRequestBeforeSend(\Guzzle\Common\Event $event)
Called before a request is sent
\Guzzle\Common\Event | $event |
onRequestSent(\Guzzle\Common\Event $event)
Triggers the actual log write when a request completes
\Guzzle\Common\Event | $event |