Skip to content

Commit 67343bd

Browse files
authored
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.
1 parent c6efb27 commit 67343bd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Classes/Command/JobCommandController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ public function workCommand($queue, $exitAfter = null, $limit = null, $verbose =
8888
$numberOfJobExecutions ++;
8989
$this->outputLine('<error>%s</error>', [$exception->getMessage()]);
9090
if ($verbose && $exception->getPrevious() instanceof \Exception) {
91-
$this->outputLine(' Reason: %s', [$exception->getPrevious()->getMessage()]);
91+
$this->outputLine('Reason:');
92+
$this->outputLine($exception->getPrevious()->getMessage());
9293
}
9394
} catch (\Exception $exception) {
9495
$this->outputLine('<error>Unexpected exception during job execution: %s, aborting...</error>', [$exception->getMessage()]);

0 commit comments

Comments
 (0)