Skip to content

Commit

Permalink
Update untracked message log
Browse files Browse the repository at this point in the history
Avoid generic log message in order to have dedicated error by missing message instead of one global.
  • Loading branch information
Inkod committed Oct 9, 2023
1 parent 83e57b7 commit 9903a56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Listener/Symfony/MessengerListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function onMessageReceived(WorkerMessageReceivedEvent $event): void
if (is_object($message) && !in_array($class = get_class($message), $this->config->getMessageToAssert(), true)) {
$this->logger->log(
$this->logLevel,
'Untracked message has been detected, add it in your configuration to ensure ZDD compliance.',
'Untracked {message} has been detected, add it in your configuration to ensure ZDD compliance.',
[
'message' => $class,
],
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Listener/Symfony/MessengerListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function testOnMessageReceivedLogMessageWhenMessageIsNotTracked(object $m
$messageListener->onMessageReceived($event);

self::assertTrue($spyLogger->hasRecord(
'Untracked message has been detected, add it in your configuration to ensure ZDD compliance.',
'Untracked {message} has been detected, add it in your configuration to ensure ZDD compliance.',
$logLevel,
[
'message' => $class,
Expand Down

0 comments on commit 9903a56

Please sign in to comment.