From 67343bd9486eb27c78a62d81d04786e6621348e8 Mon Sep 17 00:00:00 2001 From: Johannes Steu Date: Thu, 5 Mar 2020 12:24:34 +0100 Subject: [PATCH] Output verbose exception msg on seperate line This change outputs the exception message on a worker in verbose mode on a seperate line. This allows parsing json data on console output. --- Classes/Command/JobCommandController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/Command/JobCommandController.php b/Classes/Command/JobCommandController.php index 860da21..faf1b8a 100644 --- a/Classes/Command/JobCommandController.php +++ b/Classes/Command/JobCommandController.php @@ -88,7 +88,8 @@ public function workCommand($queue, $exitAfter = null, $limit = null, $verbose = $numberOfJobExecutions ++; $this->outputLine('%s', [$exception->getMessage()]); if ($verbose && $exception->getPrevious() instanceof \Exception) { - $this->outputLine(' Reason: %s', [$exception->getPrevious()->getMessage()]); + $this->outputLine('Reason:'); + $this->outputLine($exception->getPrevious()->getMessage()); } } catch (\Exception $exception) { $this->outputLine('Unexpected exception during job execution: %s, aborting...', [$exception->getMessage()]);