Skip to content
Browse files

log the request that created the web socket

  • Loading branch information...
1 parent 660abaa commit a6a692a13ead803c8c08b436b6b5e740371546ec @pietern pietern committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 twisted/consumer/wsserver.py
View
8 twisted/consumer/wsserver.py
@@ -11,12 +11,12 @@
class HashSubscriber(RedisSubscriber):
def messageReceived(self, channel, message):
- log.msg("channel %s: message: %s" % (channel, message))
self.websocket.write("channel %s: message: %s" % (channel, message))
class HashfeedrWebSocket(websocket.WebSocketHandler):
- def __init__(self,transport,site):
- websocket.WebSocketHandler.__init__(self,transport,site)
+ def __init__(self,transport,request):
+ websocket.WebSocketHandler.__init__(self,transport,request)
+ log.msg("%s: New connection, %s" % (repr(self),request))
self.connected = True
self.createSubscriber()
@@ -47,7 +47,7 @@ def frameReceived(self,frame):
pass
def connectionLost(self,reason):
- log.msg("ws: connection lost")
+ log.msg("%s: Connection lost" % repr(self))
self.connected = False
try:
self.destroyRedisClient()

0 comments on commit a6a692a

Please sign in to comment.
Something went wrong with that request. Please try again.