Skip to content

Commit fbdf11e

Browse files
committed
better logging
Signed-off-by: Angelo De Caro <[email protected]>
1 parent d1c63cb commit fbdf11e

File tree

1 file changed

+2
-1
lines changed
  • platform/view/services/comm/host/rest/websocket

1 file changed

+2
-1
lines changed

platform/view/services/comm/host/rest/websocket/stream.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"io"
1212

1313
"github.com/gorilla/websocket"
14+
"github.com/hyperledger-labs/fabric-smart-client/platform/common/services/logging"
1415
host2 "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/comm/host"
1516
"github.com/hyperledger-labs/fabric-smart-client/platform/view/services/comm/host/rest"
1617
)
@@ -125,7 +126,7 @@ func (s *stream) Write(p []byte) (int, error) {
125126
logger.Debugf("Wrote to [%s@%s], but message not ready yet.", s.info.RemotePeerID, s.info.RemotePeerAddress)
126127
return n, nil
127128
}
128-
logger.Debugf("Ready to send to [%s@%s]: [%s]", s.info.RemotePeerID, s.info.RemotePeerAddress, content)
129+
logger.Debugf("Ready to send to [%s@%s]: [%s]", s.info.RemotePeerID, s.info.RemotePeerAddress, logging.Base64(content))
129130
if err := s.conn.WriteMessage(websocket.TextMessage, content); err != nil {
130131
return 0, err
131132
}

0 commit comments

Comments
 (0)