diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-03-17 16:42:53 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-03-24 16:21:25 +0100 |
commit | 6be7aa112f6174c1406cfef5449836124a7f6f50 (patch) | |
tree | 5029bf9659caeab8702e9fabbbdeb9a2cd849bfa /lib/private/Federation/CloudFederationProviderManager.php | |
parent | fbf1334dc8c192ebdd335663cacfb810daf4d841 (diff) | |
download | nextcloud-server-6be7aa112f6174c1406cfef5449836124a7f6f50.tar.gz nextcloud-server-6be7aa112f6174c1406cfef5449836124a7f6f50.zip |
Migrate from ILogger to LoggerInterface in lib/private
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Federation/CloudFederationProviderManager.php')
-rw-r--r-- | lib/private/Federation/CloudFederationProviderManager.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/private/Federation/CloudFederationProviderManager.php b/lib/private/Federation/CloudFederationProviderManager.php index c19ca8429ca..c25d4a40363 100644 --- a/lib/private/Federation/CloudFederationProviderManager.php +++ b/lib/private/Federation/CloudFederationProviderManager.php @@ -32,7 +32,7 @@ use OCP\Federation\ICloudFederationProviderManager; use OCP\Federation\ICloudFederationShare; use OCP\Federation\ICloudIdManager; use OCP\Http\Client\IClientService; -use OCP\ILogger; +use Psr\Log\LoggerInterface; /** * Class Manager @@ -55,8 +55,7 @@ class CloudFederationProviderManager implements ICloudFederationProviderManager /** @var ICloudIdManager */ private $cloudIdManager; - /** @var ILogger */ - private $logger; + private LoggerInterface $logger; /** @var array cache OCM end-points */ private $ocmEndPoints = []; @@ -69,12 +68,11 @@ class CloudFederationProviderManager implements ICloudFederationProviderManager * @param IAppManager $appManager * @param IClientService $httpClientService * @param ICloudIdManager $cloudIdManager - * @param ILogger $logger */ public function __construct(IAppManager $appManager, IClientService $httpClientService, ICloudIdManager $cloudIdManager, - ILogger $logger) { + LoggerInterface $logger) { $this->cloudFederationProvider = []; $this->appManager = $appManager; $this->httpClientService = $httpClientService; @@ -156,7 +154,7 @@ class CloudFederationProviderManager implements ICloudFederationProviderManager // we re-throw the exception and fall back to the old behaviour. // (flat re-shares has been introduced in Nextcloud 9.1) if ($e->getCode() === Http::STATUS_INTERNAL_SERVER_ERROR) { - $this->logger->debug($e->getMessage()); + $this->logger->debug($e->getMessage(), ['exception' => $e]); throw $e; } } @@ -190,7 +188,7 @@ class CloudFederationProviderManager implements ICloudFederationProviderManager } } catch (\Exception $e) { // log the error and return false - $this->logger->error('error while sending notification for federated share: ' . $e->getMessage()); + $this->logger->error('error while sending notification for federated share: ' . $e->getMessage(), ['exception' => $e]); } return false; |