summaryrefslogtreecommitdiffstats
path: root/core/command/upgrade.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/command/upgrade.php')
-rw-r--r--core/command/upgrade.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/core/command/upgrade.php b/core/command/upgrade.php
index c4f724d7e0a..44e0b66c17c 100644
--- a/core/command/upgrade.php
+++ b/core/command/upgrade.php
@@ -3,6 +3,7 @@
* @author Andreas Fischer <bantu@owncloud.com>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Owen Winkler <a_github@midnightcircus.com>
+ * @author Steffen Lindner <mail@steffen-lindner.de>
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Vincent Petry <pvince81@owncloud.com>
*
@@ -25,6 +26,7 @@
namespace OC\Core\Command;
+use OC\Console\TimestampFormatter;
use OC\Updater;
use OCP\IConfig;
use Symfony\Component\Console\Command\Command;
@@ -109,6 +111,12 @@ class Upgrade extends Command {
}
if(\OC::checkUpgrade(false)) {
+ if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) {
+ // Prepend each line with a little timestamp
+ $timestampFormatter = new TimestampFormatter($this->config, $output->getFormatter());
+ $output->setFormatter($timestampFormatter);
+ }
+
$self = $this;
$updater = new Updater(\OC::$server->getHTTPHelper(),
\OC::$server->getConfig());
@@ -129,9 +137,11 @@ class Upgrade extends Command {
$updater->listen('\OC\Updater', 'updateEnd',
function ($success) use($output, $updateStepEnabled, $self) {
$mode = $updateStepEnabled ? 'Update' : 'Update simulation';
- $status = $success ? 'successful' : 'failed' ;
- $type = $success ? 'info' : 'error';
- $message = "<$type>$mode $status</$type>";
+ if ($success) {
+ $message = "<info>$mode successful</info>";
+ } else {
+ $message = "<error>$mode failed</error>";
+ }
$output->writeln($message);
});
$updater->listen('\OC\Updater', 'dbUpgrade', function () use($output) {