add contexts to log items
This commit is contained in:
bovenliggende
fe60f1102d
commit
73694a1c57
@ -68,7 +68,7 @@ class Client
|
||||
{
|
||||
$options['headers']['Authorization'] = 'Bearer '.$this->accessToken;
|
||||
|
||||
$this->getLoggerHandler()->getLogger()->debug('request '.$url, $options);
|
||||
$this->getLoggerHandler()->getLogger()->debug('linkmobility request: '.$url, $options);
|
||||
|
||||
$response = $this->requestClient->request(
|
||||
$method,
|
||||
@ -78,7 +78,8 @@ class Client
|
||||
|
||||
if ($response->getStatusCode() != 200) {
|
||||
$message = sprintf(ExceptionMessages::NOK_REQUEST_RETURN, $url, $response->getStatusCode());
|
||||
$this->getLoggerHandler()->getLogger()->error($message);
|
||||
$response->getBody()->rewind();
|
||||
$this->getLoggerHandler()->getLogger()->error($message, [$response->getBody()->getContents()]);
|
||||
throw new ApiException($message);
|
||||
}
|
||||
|
||||
|
@ -76,9 +76,9 @@ class RecipientsList implements RecipientsListInterface, Iterator
|
||||
|
||||
$this->recipients[ md5(serialize($recipient)) ] = $recipient;
|
||||
} catch (NumberParseException $e) {
|
||||
$this->client->getLoggerHandler()->getLogger()->info($e->getMessage());
|
||||
$this->client->getLoggerHandler()->getLogger()->info($e->getMessage(), [$recipient]);
|
||||
} catch (RecipientException $e) {
|
||||
$this->client->getLoggerHandler()->getLogger()->info($e->getMessage());
|
||||
$this->client->getLoggerHandler()->getLogger()->info($e->getMessage(), [$recipient]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
Laden…
x
Verwijs in nieuw issue
Block a user