From 4df473779d206e7a18984c1b1d2b9c2b5b634245 Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Sat, 17 Aug 2024 18:29:44 +0200 Subject: [PATCH] fix: log full events --- ws/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ws/client.go b/ws/client.go index 765de92b..505ed64a 100644 --- a/ws/client.go +++ b/ws/client.go @@ -114,7 +114,7 @@ func (c *Client) startReading(pongWait time.Duration) { _ = c.conn.CloseHandler()(websocket.CloseNormalClosure, fmt.Sprintf("malformed message: %s", err)) return } - c.debug().Interface("event", fmt.Sprintf("%T", incoming)).Msg("WebSocket Receive") + c.debug().Interface("event", fmt.Sprintf("%T", incoming)).Interface("payload", incoming).Msg("WebSocket Receive") c.read <- ClientMessage{Info: c.info, Incoming: incoming} } } @@ -153,7 +153,7 @@ func (c *Client) startWriteHandler(pingPeriod time.Duration) { _ = c.conn.SetWriteDeadline(time.Now().Add(writeWait)) typed, err := ToTypedOutgoing(message) - c.debug().Interface("event", typed.Type).Msg("WebSocket Send") + c.debug().Interface("event", typed.Type).Interface("payload", typed.Payload).Msg("WebSocket Send") if err != nil { c.debug().Err(err).Msg("could not get typed message, exiting connection.") conClosed()