Skip to content

Commit

Permalink
fix: log full events
Browse files Browse the repository at this point in the history
  • Loading branch information
jmattheis committed Aug 17, 2024
1 parent d9b4d3c commit 4df4737
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ws/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
}
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 4df4737

Please sign in to comment.