chore: edit logs messages

This commit is contained in:
Maël Gangloff
2025-10-03 18:14:43 +02:00
parent 400ea42cb2
commit 49242af42f
9 changed files with 81 additions and 62 deletions

View File

@@ -59,17 +59,17 @@ readonly class ChatNotificationService
throw new BadRequestHttpException('Unsupported message type');
}
$this->logger->info('Chat message sent with {schema} for Watchlist {token}',
[
'scheme' => $webhookScheme->name,
'token' => $watchList->getToken(),
]);
$this->logger->info('Chat message sent', [
'username' => $watchList->getUser()->getUserIdentifier(),
'scheme' => $webhookScheme->name,
'watchlist' => $watchList->getToken(),
]);
} catch (\Throwable $exception) {
$this->logger->error('Unable to send a chat message to {scheme} for Watchlist {token}',
[
'scheme' => $webhookScheme->name,
'token' => $watchList->getToken(),
]);
$this->logger->error('Unable to send a chat message', [
'username' => $watchList->getUser()->getUserIdentifier(),
'scheme' => $webhookScheme->name,
'watchlist' => $watchList->getToken(),
]);
throw new BadRequestHttpException($exception->getMessage());
}
}