From caa0ae94e8a26a05df8542d29164b610bf031eac Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 11 May 2017 13:35:17 -0500 Subject: Proper logging for appstore updates Signed-off-by: Morris Jobke --- core/Command/Upgrade.php | 8 +++++++- core/ajax/update.php | 9 +++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 2e518f52e21..abc37527d2a 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -220,8 +220,14 @@ class Upgrade extends Command { $updater->listen('\OC\Updater', 'thirdPartyAppDisabled', function ($app) use ($output) { $output->writeln('Disabled 3rd-party app: ' . $app . ''); }); + $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use($output) { + $output->writeln('Checking for update of app ' . $app . ' in appstore'); + }); $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use($output) { - $output->writeln('Update 3rd-party app: ' . $app . ''); + $output->writeln('Update app ' . $app . ' from appstore'); + }); + $updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use($output) { + $output->writeln('Checked for update of app "' . $app . '" in appstore '); }); $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($output) { $output->writeln('Checking updates of apps'); diff --git a/core/ajax/update.php b/core/ajax/update.php index 37abdc5dc3b..d23e3b0d56d 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -160,6 +160,15 @@ if (OC::checkUpgrade(false)) { $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Checking updates of apps')); }); + $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($eventSource, $l) { + $eventSource->send('success', (string)$l->t('Checking for update of app "%s" in appstore', [$app])); + }); + $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($eventSource, $l) { + $eventSource->send('success', (string)$l->t('Update app "%s" from appstore', [$app])); + }); + $updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($eventSource, $l) { + $eventSource->send('success', (string)$l->t('Checked for update of app "%s" in appstore', [$app])); + }); $updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app])); }); -- cgit v1.2.3