From 03a7c7819b27420f03a023ac9af6f3dd6cafe2f5 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Thu, 12 Dec 2024 17:38:55 +0100 Subject: [PATCH] feat: log received messages in ChatSession subscriber for better debugging --- zenoh-ts/examples/chat/src/main.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/zenoh-ts/examples/chat/src/main.ts b/zenoh-ts/examples/chat/src/main.ts index 8c61f6e..8ef8a3b 100644 --- a/zenoh-ts/examples/chat/src/main.ts +++ b/zenoh-ts/examples/chat/src/main.ts @@ -74,6 +74,7 @@ class ChatSession { this.messages_publisher = this.session.declare_publisher(keyexpr, {}); this.message_subscriber = await this.session.declare_subscriber(keyexpr, (sample) => { + log(`[Subscriber] Received message: ${sample.payload.toString()} from ${sample.keyexpr().toString()}`); if (this.messageCallback) { this.messageCallback(sample.payload.toString()); }