Skip to content

Commit 4df4737

Browse files
committed
fix: log full events
1 parent d9b4d3c commit 4df4737

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ws/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (c *Client) startReading(pongWait time.Duration) {
114114
_ = c.conn.CloseHandler()(websocket.CloseNormalClosure, fmt.Sprintf("malformed message: %s", err))
115115
return
116116
}
117-
c.debug().Interface("event", fmt.Sprintf("%T", incoming)).Msg("WebSocket Receive")
117+
c.debug().Interface("event", fmt.Sprintf("%T", incoming)).Interface("payload", incoming).Msg("WebSocket Receive")
118118
c.read <- ClientMessage{Info: c.info, Incoming: incoming}
119119
}
120120
}
@@ -153,7 +153,7 @@ func (c *Client) startWriteHandler(pingPeriod time.Duration) {
153153

154154
_ = c.conn.SetWriteDeadline(time.Now().Add(writeWait))
155155
typed, err := ToTypedOutgoing(message)
156-
c.debug().Interface("event", typed.Type).Msg("WebSocket Send")
156+
c.debug().Interface("event", typed.Type).Interface("payload", typed.Payload).Msg("WebSocket Send")
157157
if err != nil {
158158
c.debug().Err(err).Msg("could not get typed message, exiting connection.")
159159
conClosed()

0 commit comments

Comments
 (0)