From b6be02c975b963f19a6dea5469c6e89b28fd6a34 Mon Sep 17 00:00:00 2001 From: Andrew Paxley Date: Mon, 17 Jan 2022 16:32:17 +1300 Subject: [PATCH] only log if theres something to log (#353) --- src/Services/QueuedJobService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Services/QueuedJobService.php b/src/Services/QueuedJobService.php index 9d0d0088..910d2f28 100644 --- a/src/Services/QueuedJobService.php +++ b/src/Services/QueuedJobService.php @@ -899,7 +899,9 @@ public function runJob($jobId) if (!$broken) { // Collect output where jobs aren't using the logger singleton ob_start(function ($buffer, $phase) use ($job, $jobDescriptor) { - $job->addMessage($buffer); + if (!empty($buffer)) { + $job->addMessage($buffer); + } if ($jobDescriptor) { $this->copyJobToDescriptor($job, $jobDescriptor); $jobDescriptor->write();