From dbb1eef44698b2cd36f5dbe1dc57abd721dd499c Mon Sep 17 00:00:00 2001
From: Daniel Kesselberg <mail@danielkesselberg.de>
Date: Sun, 8 Dec 2019 18:16:45 +0100
Subject: [PATCH] Don't log the stack trace for ConnectException

The stack trace for ConnectException could contain the old apps.json content and is probably huge.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
---
 lib/private/App/AppStore/Fetcher/Fetcher.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php
index 3716b7b7958..78c36d6123c 100644
--- a/lib/private/App/AppStore/Fetcher/Fetcher.php
+++ b/lib/private/App/AppStore/Fetcher/Fetcher.php
@@ -174,10 +174,10 @@ abstract class Fetcher {
 			$file->putContent(json_encode($responseJson));
 			return json_decode($file->getContent(), true)['data'];
 		} catch (ConnectException $e) {
-			$this->logger->logException($e, ['app' => 'appstoreFetcher', 'level' => ILogger::INFO, 'message' => 'Could not connect to appstore']);
+			$this->logger->warning('Could not connect to appstore: ' . $e->getMessage(), ['app' => 'appstoreFetcher']);
 			return [];
 		} catch (\Exception $e) {
-			$this->logger->logException($e, ['app' => 'appstoreFetcher', 'level' => ILogger::INFO]);
+			$this->logger->logException($e, ['app' => 'appstoreFetcher', 'level' => ILogger::WARN]);
 			return [];
 		}
 	}
-- 
GitLab