forked from apoloz/alfa-bank-sdk
WIP
This commit is contained in:
@@ -114,10 +114,8 @@ class AlfaBankConnector extends Connector implements HasPagination
|
||||
// <BELIEF_STATE "Logging should be an optional, opt-in feature. This method provides a fluent interface to attach a logging middleware, which will automatically sanitize sensitive data before output.">
|
||||
public function withLogging(\Psr\Log\LoggerInterface $logger): static
|
||||
{
|
||||
$middleware = new \Apoloz\AlfaBank\Http\Middleware\LoggingMiddleware($logger);
|
||||
|
||||
$this->middleware()->onRequest([$middleware, 'onRequest']);
|
||||
$this->middleware()->onResponse([$middleware, 'onResponse']);
|
||||
$this->middleware()->onRequest(new \Apoloz\AlfaBank\Http\Middleware\LoggingRequestMiddleware($logger));
|
||||
$this->middleware()->onResponse(new \Apoloz\AlfaBank\Http\Middleware\LoggingResponseMiddleware($logger));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user