From bc8625800a5ed62d008684fafcb5cc80e4772056 Mon Sep 17 00:00:00 2001 From: Adam Charnock Date: Sat, 30 Nov 2024 08:04:06 +0000 Subject: [PATCH] Logging improvement when sending an event --- lightbus/client/subclients/event.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lightbus/client/subclients/event.py b/lightbus/client/subclients/event.py index 6ffb0f4e..b6ecf3b9 100644 --- a/lightbus/client/subclients/event.py +++ b/lightbus/client/subclients/event.py @@ -109,7 +109,13 @@ async def fire_event( validate_outgoing(self.config, self.schema, event_message) await self.hook_registry.execute("before_event_sent", event_message=event_message) - logger.info(L("📤 Sending event {}.{}".format(Bold(api_name), Bold(name)))) + logger.info( + L( + "📤 Sending event {}.{} with ID {}".format( + Bold(api_name), Bold(name), event_message.id + ) + ) + ) await self.producer.send(SendEventCommand(message=event_message, options=options)).wait()