Overview

Namespaces

  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • 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
    • Tests
      • Batch
      • Cache
      • Common
        • Cache
        • Exception
      • Http
        • Curl
        • Exception
        • Message
          • Header
      • Inflection
      • Iterator
      • Log
      • Message
      • Mock
      • Parser
        • Cookie
        • Message
      • Parsers
        • UriTemplate
      • Plugin
        • Async
        • Backoff
        • Cache
        • Cookie
          • CookieJar
        • CurlAuth
        • ErrorResponse
        • History
        • Log
        • Md5
        • Mock
        • Oauth
        • Redirect
      • Service
        • Builder
        • Command
          • LocationVisitor
            • Request
            • Response
        • Description
        • Exception
        • Mock
          • Command
            • Sub
          • Model
        • Resource
      • Stream
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • VivaPayments
      • Message
  • PHP

Classes

  • LogPlugin
  • Overview
  • Namespace
  • Class
  • Tree

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 src/Guzzle/Plugin/Log/LogPlugin.php
Methods summary
public
# __construct( Guzzle\Log\LogAdapterInterface $logAdapter, string|Guzzle\Log\MessageFormatter $formatter = null, boolean $wireBodies = false )

Parameters

$logAdapter
Adapter object used to log message
$formatter
Formatter used to format log messages or the formatter template
$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
Set to false to disable request/response body output when they use are not repeatable
$stream
Stream to write to when logging. Defaults to STDERR when it is available

Returns

Guzzle\Plugin\Log\LogPlugin
public static
# 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
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
public
# onRequestBeforeSend( Guzzle\Common\Event $event )

Called before a request is sent

Called before a request is sent

Parameters

$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
Properties summary
protected Guzzle\Log\LogAdapterInterface $logAdapter

Adapter responsible for writing log data

Adapter responsible for writing log data

#
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

#
Omnipay Viva Payments Gateway Module API Documentation API documentation generated by ApiGen