From d8a1a1205bcd6652e08f39ed444e285409e4c257 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 18 Nov 2012 18:36:05 +0100 Subject: [PATCH] http: Log content of incoming WebSocket messages --- mopidy/frontends/http/ws.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mopidy/frontends/http/ws.py b/mopidy/frontends/http/ws.py index 581eb849..bda896a0 100644 --- a/mopidy/frontends/http/ws.py +++ b/mopidy/frontends/http/ws.py @@ -39,9 +39,11 @@ class WebSocketHandler(WebSocket): remote.ip, remote.port, code, reason) def received_message(self, message): + message = str(message) + remote = cherrypy.request.remote logger.debug( - 'Received WebSocket message from %s:%d: %s', + 'Received WebSocket message from %s:%d: %r', remote.ip, remote.port, message) # This is where we would handle incoming messages from the clients