From 8bb4b0b9b220859363262256065149a1af7ee1f4 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 6 Jan 2018 20:26:21 +0100 Subject: [PATCH] Make sure log stays small. --- app/Repositories/ImportJob/ImportJobRepository.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Repositories/ImportJob/ImportJobRepository.php b/app/Repositories/ImportJob/ImportJobRepository.php index a8cc181ff6..7300ee4bc2 100644 --- a/app/Repositories/ImportJob/ImportJobRepository.php +++ b/app/Repositories/ImportJob/ImportJobRepository.php @@ -261,12 +261,18 @@ class ImportJobRepository implements ImportJobRepositoryInterface */ public function setExtendedStatus(ImportJob $job, array $array): ImportJob { - Log::debug(sprintf('Incoming extended status for job "%s" is: ', $job->key), $array); + // remove 'errors' because it gets larger and larger and larger... + $display = $array; + unset($display['errors']); + Log::debug(sprintf('Incoming extended status for job "%s" is (except errors): ', $job->key), $display); $currentStatus = $job->extended_status; $newStatus = array_merge($currentStatus, $array); $job->extended_status = $newStatus; $job->save(); - Log::debug(sprintf('Set extended status of job "%s" to: ', $job->key), $newStatus); + + // remove 'errors' because it gets larger and larger and larger... + unset($newStatus['errors']); + Log::debug(sprintf('Set extended status of job "%s" to (except errors): ', $job->key), $newStatus); return $job; }