Add logging
This commit is contained in:
@@ -211,6 +211,7 @@ class GroupsSwissService implements SingletonInterface, LoggerAwareInterface
|
||||
*/
|
||||
protected function addItem(array $item, $status, $apiKey, $houseNumber): void
|
||||
{
|
||||
$this->logger->info(sprintf('Adding status %d in %s-%s for %s', $status, $item['from']->format('Y-m-d'), $item['to']->format('Y-m-d'), $houseNumber));
|
||||
$url = sprintf(
|
||||
'http://www.groups.swiss/api/1.0/json.php?apiKey=%s&method=setAvailabilityChart&house=%d&from=%s&till=%s&state=%d',
|
||||
$apiKey,
|
||||
@@ -221,8 +222,7 @@ class GroupsSwissService implements SingletonInterface, LoggerAwareInterface
|
||||
);
|
||||
|
||||
try {
|
||||
$foo = 1;
|
||||
// $this->httpClient->request('GET', $url);
|
||||
$this->httpClient->request('GET', $url);
|
||||
} catch (TransportExceptionInterface $e) {
|
||||
$this->logger->error(sprintf('A problem occured: %s', $e->getMessage()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user