Skip to content

Commit

Permalink
Logging improvement when sending an event
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcharnock committed Nov 30, 2024
1 parent 5d50283 commit bc86258
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lightbus/client/subclients/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit bc86258

Please sign in to comment.