Composable Commerce PHP SDKPHP SDK
  • Namespace
  • Class
  • Tree

Namespaces

  • Commercetools
    • Commons
      • Helper
    • Core
      • Builder
        • Request
        • Update
      • Cache
      • Client
        • Adapter
        • OAuth
      • Error
      • Helper
        • Annotate
        • State
          • Renderer
        • Subscriber
          • Log
      • Model
        • ApiClient
        • Cart
        • CartDiscount
        • Category
        • Channel
        • Common
        • Customer
        • CustomerGroup
        • CustomField
        • CustomObject
        • DiscountCode
        • Extension
        • Inventory
        • Message
        • Order
        • OrderEdit
        • Payment
        • Product
          • Search
        • ProductDiscount
        • ProductSelection
        • ProductType
        • Project
        • Review
        • ShippingMethod
        • ShoppingList
        • State
        • Store
        • Subscription
        • TaxCategory
        • Type
        • Zone
      • Request
        • ApiClients
        • CartDiscounts
          • Command
        • Carts
          • Command
        • Categories
          • Command
        • Channels
          • Command
        • CustomerGroups
          • Command
        • Customers
          • Command
        • CustomField
          • Command
        • CustomObjects
        • DiscountCodes
          • Command
        • Extensions
          • Command
        • GraphQL
        • InStores
        • Inventory
          • Command
        • Me
          • Command
        • Messages
        • OrderEdits
          • Command
          • StagedOrder
            • Command
        • Orders
          • Command
        • Payments
          • Command
        • ProductDiscounts
          • Command
        • Products
          • Command
        • ProductSelections
          • Command
        • ProductTypes
          • Command
        • Project
          • Command
        • Query
        • Reviews
          • Command
        • ShippingMethods
          • Command
        • ShoppingLists
          • Command
        • States
          • Command
        • Stores
          • Command
        • Subscriptions
          • Command
        • TaxCategories
          • Command
        • Types
          • Command
        • Zones
          • Command
      • Response

Classes

  • Formatter
  • LogSubscriber
  • SimpleLogger

Class LogSubscriber

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.

Commercetools\Core\Helper\Subscriber\Log\LogSubscriber implements GuzzleHttp\Event\SubscriberInterface
Namespace: Commercetools\Core\Helper\Subscriber\Log
See: MessageLogger for a list of available template variable substitutions
Located at Core/Helper/Subscriber/Log/LogSubscriber.php

Methods summary

public
# __construct( Psr\Log\LoggerInterface|callable|resource|null $logger = null, string|Commercetools\Core\Helper\Subscriber\Log\Formatter $formatter = null, $logLevel = Commercetools\Core\Helper\Subscriber\Log\LogLevel::INFO )

Parameters

$logger

Logger used to log messages. Pass a LoggerInterface to use a PSR-3 logger. Pass a callable to log messages to a function that accepts a string of data. Pass a resource returned from fopen() to log to an open resource. Pass null or leave empty to write log messages using echo().

$formatter

Formatter used to format log messages or a string representing a message formatter template.

$logLevel
public
# getEvents( )
public
# onComplete( GuzzleHttp\Event\CompleteEvent $event )
public
# onError( GuzzleHttp\Event\ErrorEvent $event )
PHP SDK API documentation generated by ApiGen