From 244cbd70020154aea877d346f123fb2368b266b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Tue, 8 Jun 2021 17:44:33 +0200 Subject: [PATCH] Add logging --- .../ext/ep_products/Classes/Service/GroupsSwissService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Service/GroupsSwissService.php b/public/typo3conf/ext/ep_products/Classes/Service/GroupsSwissService.php index 44d5c1d5..eca91347 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/GroupsSwissService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/GroupsSwissService.php @@ -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())); }