Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 453 Bytes

logger.md

File metadata and controls

19 lines (13 loc) · 453 Bytes

Log Subscriber

Require any PSR-3 Log implementation:

composer require psr/log-implementation

Register the log subscriber:

use Phpro\SoapClient\Event\Subscriber\LogSubscriber;

$eventDispatcher->addSubscriber(new LogSubscriber($logger));

The logger accepts a PSR-3 LoggerInterface. It will hook in to the Request, Response and Fault event and will log every step of the SOAP process. No more code pollution for logging!