From 53c4561af58cbeb8678f5bc928d0f81af7cc5765 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 14 Jul 2022 09:39:25 +0200 Subject: [PATCH] set logger to new logger handler class --- composer.json | 2 +- src/Application/Model/MessageClient.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 9b5da4f..69b9cc6 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "require": { "php": "^7.0 || ^8.0", "oxid-esales/oxideshop-ce": "6.7 - 6.10", - "d3/linkmobility-php-client": "^1.0" + "d3/linkmobility-php-client": "^1.2.0" }, "extra": { "oxideshop": { diff --git a/src/Application/Model/MessageClient.php b/src/Application/Model/MessageClient.php index fc1b213..9d16f2d 100644 --- a/src/Application/Model/MessageClient.php +++ b/src/Application/Model/MessageClient.php @@ -16,6 +16,7 @@ declare(strict_types=1); namespace D3\Linkmobility4OXID\Application\Model; use D3\LinkmobilityClient\Client; +use D3\LinkmobilityClient\LoggerHandler; use OxidEsales\Eshop\Core\Registry; class MessageClient @@ -26,7 +27,8 @@ class MessageClient public function getClient(): Client { $client = oxNew(Client::class, oxNew(Configuration::class)->getApiToken()); - $client->setLogger(Registry::getLogger()); + LoggerHandler::getInstance()->setLogger(Registry::getLogger()); + return $client; } }