From d807689e85825351b58f11927b3ad7a7926473c3 Mon Sep 17 00:00:00 2001 From: mattab <matthieu.aubry@gmail.com> Date: Wed, 18 Jan 2017 11:20:27 +1300 Subject: [PATCH] Better logging message when archiving --- core/ArchiveProcessor/PluginsArchiver.php | 5 +++-- core/Plugin/ConsoleCommand.php | 2 +- plugins/CoreAdminHome/Commands/SetConfig.php | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/ArchiveProcessor/PluginsArchiver.php b/core/ArchiveProcessor/PluginsArchiver.php index 42b497c4b7..f251551a6d 100644 --- a/core/ArchiveProcessor/PluginsArchiver.php +++ b/core/ArchiveProcessor/PluginsArchiver.php @@ -138,11 +138,12 @@ class PluginsArchiver $this->logAggregator->setQueryOriginHint(''); - Log::debug("PluginsArchiver::%s: %s while archiving %s reports for plugin '%s'.", + Log::debug("PluginsArchiver::%s: %s while archiving %s reports for plugin '%s' %s.", __FUNCTION__, $timer->getMemoryLeak(), $this->params->getPeriod()->getLabel(), - $pluginName + $pluginName, + $this->params->getSegment() ? sprintf("(for segment = '%s')", $this->params->getSegment()->getString()) : '' ); } catch (Exception $e) { $className = get_class($e); diff --git a/core/Plugin/ConsoleCommand.php b/core/Plugin/ConsoleCommand.php index 91d18c5c77..e009f058e7 100644 --- a/core/Plugin/ConsoleCommand.php +++ b/core/Plugin/ConsoleCommand.php @@ -39,7 +39,7 @@ class ConsoleCommand extends SymfonyCommand $value = $input->getOption($name); if ($option->isValueRequired() && empty($value)) { - throw new \InvalidArgumentException(sprintf('The required option %s is not set', $name)); + throw new \InvalidArgumentException(sprintf('The required option --%s is not set', $name)); } } } diff --git a/plugins/CoreAdminHome/Commands/SetConfig.php b/plugins/CoreAdminHome/Commands/SetConfig.php index 49b1925fd3..9f2d6f0b9a 100644 --- a/plugins/CoreAdminHome/Commands/SetConfig.php +++ b/plugins/CoreAdminHome/Commands/SetConfig.php @@ -73,12 +73,12 @@ Use the --piwik-domain option to specify which instance to modify. foreach ($manipulations as $manipulation) { $manipulation->manipulate($config); - $output->writeln("<info>Setting [{$manipulation->getSectionName()}] {$manipulation->getName()} = {$manipulation->getValueString()}</info>"); + $output->write("<info>Setting [{$manipulation->getSectionName()}] {$manipulation->getName()} = {$manipulation->getValueString()}...</info>"); + $output->writeln("<info> done.</info>"); } $config->forceSave(); - $this->writeSuccessMessage($output, array("Done.")); } /** -- GitLab