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>
This commit is contained in:
Daniel Kesselberg 2019-12-08 18:16:45 +01:00
parent 2959487f71
commit dbb1eef446
No known key found for this signature in database
GPG key ID: 36E3664E099D0614

View file

@ -174,10 +174,10 @@ abstract class Fetcher {
$file->putContent(json_encode($responseJson)); $file->putContent(json_encode($responseJson));
return json_decode($file->getContent(), true)['data']; return json_decode($file->getContent(), true)['data'];
} catch (ConnectException $e) { } 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 []; return [];
} catch (\Exception $e) { } catch (\Exception $e) {
$this->logger->logException($e, ['app' => 'appstoreFetcher', 'level' => ILogger::INFO]); $this->logger->logException($e, ['app' => 'appstoreFetcher', 'level' => ILogger::WARN]);
return []; return [];
} }
} }