Make sure log stays small.

This commit is contained in:
James Cole 2018-01-06 20:26:21 +01:00
parent 9bcd1ed807
commit 8bb4b0b9b2
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -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;
}