From 2ffa9fc79741e71c277be2913ff2e396de09a51c Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 2 May 2023 10:01:38 +0200 Subject: Only show error stack trace on very verbose level MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/files/lib/Command/Scan.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'apps/files/lib/Command') diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php index fbfc9cbca50..1d59db1faa6 100644 --- a/apps/files/lib/Command/Scan.php +++ b/apps/files/lib/Command/Scan.php @@ -192,11 +192,6 @@ class Scan extends Base { $users = $input->getArgument('user_id'); } - # restrict the verbosity level to VERBOSITY_VERBOSE - if ($output->getVerbosity() > OutputInterface::VERBOSITY_VERBOSE) { - $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); - } - # check quantity of users to be process and show it on the command line $users_total = count($users); if ($users_total === 0) { @@ -263,7 +258,8 @@ class Scan extends Base { return false; } $e = new \ErrorException($message, 0, $severity, $file, $line); - $output->writeln("\t$e"); + $output->writeln('Error during scan: ' . $e->getMessage() . ''); + $output->writeln('' . $e->getTraceAsString() . '', OutputInterface::VERBOSITY_VERY_VERBOSE); return true; } -- cgit v1.2.3