diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2023-09-02 14:16:01 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2023-09-06 05:43:21 +0200 |
commit | 9a179c391e5454dba227e1acb8be791660b58be7 (patch) | |
tree | 63fdc92d8e2ffe84bd5e3c6e83432ea05c61cfe6 /lib/private/Updater/VersionCheck.php | |
parent | db5dbd1d56ca9b667198bb321cf266180e1d1fc9 (diff) | |
download | nextcloud-server-9a179c391e5454dba227e1acb8be791660b58be7.tar.gz nextcloud-server-9a179c391e5454dba227e1acb8be791660b58be7.zip |
Print log message when version could not be got from updater server
This could help to diagnose why the updater server could not be reached,
as well as other subtler issues like requests taking too long if the
updater server was tried to be connected to as a "side effect" (for
example, when the "updatenotification" app boots).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib/private/Updater/VersionCheck.php')
-rw-r--r-- | lib/private/Updater/VersionCheck.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php index 2aab260716a..97f770b6998 100644 --- a/lib/private/Updater/VersionCheck.php +++ b/lib/private/Updater/VersionCheck.php @@ -31,6 +31,7 @@ use OCP\IConfig; use OCP\IUserManager; use OCP\Support\Subscription\IRegistry; use OCP\Util; +use Psr\Log\LoggerInterface; class VersionCheck { public function __construct( @@ -38,6 +39,7 @@ class VersionCheck { private IConfig $config, private IUserManager $userManager, private IRegistry $registry, + private LoggerInterface $logger, ) { } @@ -86,6 +88,8 @@ class VersionCheck { try { $xml = $this->getUrlContent($url); } catch (\Exception $e) { + $this->logger->info('Version could not be fetched from updater server: ' . $url, ['exception' => $e]); + return false; } |