Skip to content

Commit

Permalink
ACP-2573: Adjusted logs (#5)
Browse files Browse the repository at this point in the history
* ACP-2573: Adjusted logs
  • Loading branch information
vol4onok authored Jun 11, 2024
1 parent c08ad8f commit 40e887b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
},
"require-dev": {
"codeception/codeception": "^5.0",
"phpstan/phpstan": "^1.10.0",
"phpstan/phpstan": "1.10.66",
"phpstan/phpdoc-parser": "1.25.0",
"rector/rector": "^0.19.0",
"spryker/code-sniffer": "*",
"spryker/container": "*",
Expand Down
8 changes: 7 additions & 1 deletion src/Spryker/Zed/AppKernel/Business/Writer/ConfigWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ public function saveConfig(AppConfigTransfer $appConfigTransfer): AppConfigRespo

return $this->getSuccessResponse($appConfigTransfer);
} catch (Throwable $throwable) {
$this->getLogger()->error(static::FAILED_TO_REGISTER_TENANT_MESSAGE, ['exception' => $throwable]);
$this->getLogger()->error(
static::FAILED_TO_REGISTER_TENANT_MESSAGE,
[
'tenantIdentifier' => $appConfigTransfer->getTenantIdentifier(),
'exception' => $throwable,
],
);

return $this->getFailResponse(sprintf('%s: %s', static::FAILED_TO_REGISTER_TENANT_MESSAGE, $throwable->getMessage()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function findAppConfigByCriteria(
$errorMessage = 'Could not find an App configuration for the given Tenant';

$this->getLogger()->error($errorMessage, [
'Tenant' => $appConfigCriteriaTransfer->getTenantIdentifierOrFail(),
'tenantIdentifier' => $appConfigCriteriaTransfer->getTenantIdentifierOrFail(),
]);

throw new AppConfigNotFoundException($errorMessage);
Expand Down

0 comments on commit 40e887b

Please sign in to comment.