From 72d2e86fd7499c241adeb9627427badbfc6bede2 Mon Sep 17 00:00:00 2001 From: datashaman Date: Tue, 24 Oct 2023 12:18:13 +0200 Subject: [PATCH] log response from event ingestion endpoint (#39) * log response from event ingestion endpoint * Remove condition * use info * fix, ffs --- src/ServiceBusChannel.php | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/ServiceBusChannel.php b/src/ServiceBusChannel.php index de18404..a2cf6c2 100644 --- a/src/ServiceBusChannel.php +++ b/src/ServiceBusChannel.php @@ -84,7 +84,7 @@ public function send($notifiable, Notification $notification) ]; try { - $this->client->request( + $response = $this->client->request( 'POST', $this->getUrl('events'), [ @@ -92,18 +92,21 @@ public function send($notifiable, Notification $notification) 'json' => [$params], ] ); - if (!in_array($eventType, $dontReport)) { - Log::debug( - "$eventType service bus notification", - [ - 'event' => $eventType, - 'params' => $params, - 'tags' => [ - 'service-bus', - ], - ] - ); - } + + Log::info( + "$eventType service bus notification", + [ + 'event' => $eventType, + 'params' => $params, + 'tags' => [ + 'service-bus', + ], + 'response' => [ + 'status' => $response->getStatusCode(), + 'body' => (string) $response->getBody(), + ], + ] + ); } catch (RequestException $exception) { $code = $exception->getCode();