Add debug information to import routine.

This commit is contained in:
James Cole
2018-02-04 08:14:22 +01:00
parent f1d77bdb50
commit 28579f7b80
3 changed files with 9 additions and 1 deletions

View File

@@ -225,11 +225,17 @@ class ImportJobRepository implements ImportJobRepositoryInterface
$configFileObject = new SplFileObject($file->getRealPath());
$configRaw = $configFileObject->fread($configFileObject->getSize());
$configuration = json_decode($configRaw, true);
Log::debug(sprintf('Raw configuration is %s', $configRaw));
if (null !== $configuration && is_array($configuration)) {
Log::debug('Found configuration', $configuration);
$this->setConfiguration($job, $configuration);
}
if (null === $configuration) {
Log::error('Uploaded configuration is NULL');
}
if (false === $configuration) {
Log::error('Uploaded configuration is FALSE');
}
}
return true;