Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • LogPlugin
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class LogPlugin

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.

Guzzle\Plugin\Log\LogPlugin implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Namespace: Guzzle\Plugin\Log
See: MessageLogger for a list of available log template variable substitutions
Located at Guzzle/Plugin/Log/LogPlugin.php
Methods summary
public
# __construct( Guzzle\Log\LogAdapterInterface $logAdapter, string|Guzzle\Log\MessageFormatter $formatter = null, boolean $wireBodies = false )

Construct a new LogPlugin

Construct a new LogPlugin

Parameters

$logAdapter
Guzzle\Log\LogAdapterInterface
$logAdapter Adapter object used to log message
$formatter
string|Guzzle\Log\MessageFormatter
$formatter Formatter used to format log messages or the formatter template
$wireBodies
boolean
$wireBodies Set to true to track request and response bodies using a temporary buffer if the bodies are not repeatable.
public static Guzzle\Plugin\Log\LogPlugin
# getDebugPlugin( boolean $wireBodies = true, resource $stream = null )

Get a log plugin that outputs full request, response, and curl error information to stderr

Get a log plugin that outputs full request, response, and curl error information to stderr

Parameters

$wireBodies
boolean
$wireBodies Set to false to disable request/response body output when they use are not repeatable
$stream
resource
$stream Stream to write to when logging. Defaults to STDERR when it is available

Returns

Guzzle\Plugin\Log\LogPlugin
public static array
# getSubscribedEvents( )

Returns an array of event names this subscriber wants to listen to.

Returns an array of event names this subscriber wants to listen to.

Returns

array
The event names to listen to

Implementation of

Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()
public
# onCurlRead( Guzzle\Common\Event $event )

Event triggered when curl data is read from a request

Event triggered when curl data is read from a request

Parameters

$event
Guzzle\Common\Event
$event
public
# onCurlWrite( Guzzle\Common\Event $event )

Event triggered when curl data is written to a response

Event triggered when curl data is written to a response

Parameters

$event
Guzzle\Common\Event
$event
public
# onRequestBeforeSend( Guzzle\Common\Event $event )

Called before a request is sent

Called before a request is sent

Parameters

$event
Guzzle\Common\Event
$event
public
# onRequestSent( Guzzle\Common\Event $event )

Triggers the actual log write when a request completes

Triggers the actual log write when a request completes

Parameters

$event
Guzzle\Common\Event
$event
Properties summary
protected Guzzle\Log\MessageFormatter $formatter
#

Formatter used to format messages before logging

Formatter used to format messages before logging

protected boolean $wireBodies
#

Whether or not to wire request and response bodies

Whether or not to wire request and response bodies

php-coveralls API documentation generated by ApiGen 2.8.0