aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-11-15 14:34:09 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-11-22 02:24:59 +0000
commit0afe44c4492a0ff18026316e2d7ce0dbcf521b46 (patch)
tree61487b2c3fceae095984f4f23811c6ae90c49c55
parent8fe072e7988fded5d9dcd8c880396e0877bf407a (diff)
downloadnextcloud-server-0afe44c4492a0ff18026316e2d7ce0dbcf521b46.tar.gz
nextcloud-server-0afe44c4492a0ff18026316e2d7ce0dbcf521b46.zip
Do not print verbose info about app updates if there are none
This is cosmetical but if you have a large number of apps installed then you'll see a wall of text during the server and app upgrade when it tries to update each app via the app store. In may cases nothing will be updated. For those boring cases we can hide the verbose info, but show when occ is run with -v. Any actual update will still print a few lines. Those are the important ones for the admin. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--core/Command/Upgrade.php6
-rw-r--r--core/ajax/update.php6
-rw-r--r--lib/private/Updater.php4
3 files changed, 2 insertions, 14 deletions
diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php
index 13e150217b9..efc7124f2ea 100644
--- a/core/Command/Upgrade.php
+++ b/core/Command/Upgrade.php
@@ -204,15 +204,9 @@ class Upgrade extends Command {
$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use ($output) {
$output->writeln('<comment>Disabled incompatible app: ' . $app . '</comment>');
});
- $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($output) {
- $output->writeln('<info>Checking for update of app ' . $app . ' in appstore</info>');
- });
$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($output) {
$output->writeln('<info>Update app ' . $app . ' from App Store</info>');
});
- $updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($output) {
- $output->writeln('<info>Checked for update of app "' . $app . '" in App Store </info>');
- });
$updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($output) {
$output->writeln("<info>Checking whether the database schema for <$app> can be updated (this can take a long time depending on the database size)</info>");
});
diff --git a/core/ajax/update.php b/core/ajax/update.php
index c1ddddbecdb..39a99323cf5 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -160,15 +160,9 @@ if (\OCP\Util::needUpgrade()) {
$updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) {
$eventSource->send('success', $l->t('Updated database'));
});
- $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($eventSource, $l) {
- $eventSource->send('success', $l->t('Checking for update of app "%s" in App Store', [$app]));
- });
$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($eventSource, $l) {
$eventSource->send('success', $l->t('Update app "%s" from App Store', [$app]));
});
- $updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($eventSource, $l) {
- $eventSource->send('success', $l->t('Checked for update of app "%s" in App Store', [$app]));
- });
$updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($eventSource, $l) {
$eventSource->send('success', $l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app]));
});
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 8f21e091650..2c06cffcb19 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -545,13 +545,13 @@ class Updater extends BasicEmitter {
$log->info('\OC\Updater::incompatibleAppDisabled: Disabled incompatible app: ' . $app, ['app' => 'updater']);
});
$this->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($log) {
- $log->info('\OC\Updater::checkAppStoreAppBefore: Checking for update of app "' . $app . '" in appstore', ['app' => 'updater']);
+ $log->debug('\OC\Updater::checkAppStoreAppBefore: Checking for update of app "' . $app . '" in appstore', ['app' => 'updater']);
});
$this->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($log) {
$log->info('\OC\Updater::upgradeAppStoreApp: Update app "' . $app . '" from appstore', ['app' => 'updater']);
});
$this->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($log) {
- $log->info('\OC\Updater::checkAppStoreApp: Checked for update of app "' . $app . '" in appstore', ['app' => 'updater']);
+ $log->debug('\OC\Updater::checkAppStoreApp: Checked for update of app "' . $app . '" in appstore', ['app' => 'updater']);
});
$this->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($log) {
$log->info('\OC\Updater::appSimulateUpdate: Checking whether the database schema for <' . $app . '> can be updated (this can take a long time depending on the database size)', ['app' => 'updater']);