Browse Source

[gateway] improve debug logging format

pull/44/head
Andrei 8 years ago
parent
commit
070bb6551d
  1. 4
      disco/gateway/client.py

4
disco/gateway/client.py

@ -67,7 +67,7 @@ class GatewayClient(LoggingClass):
return self._send(op, data) return self._send(op, data)
def _send(self, op, data): def _send(self, op, data):
self.log.debug('SEND %s', op) self.log.debug('GatewayClient.send %s', op)
self.packets.emit((SEND, op), data) self.packets.emit((SEND, op), data)
self.ws.send(self.encoder.encode({ self.ws.send(self.encoder.encode({
'op': op.value, 'op': op.value,
@ -81,7 +81,7 @@ class GatewayClient(LoggingClass):
def handle_dispatch(self, packet): def handle_dispatch(self, packet):
obj = GatewayEvent.from_dispatch(self.client, packet) obj = GatewayEvent.from_dispatch(self.client, packet)
self.log.debug('Dispatching %s', obj.__class__.__name__) self.log.debug('GatewayClient.handle_dispatch %s', obj.__class__.__name__)
self.client.events.emit(obj.__class__.__name__, obj) self.client.events.emit(obj.__class__.__name__, obj)
if self.replaying: if self.replaying:
self.replayed_events += 1 self.replayed_events += 1

Loading…
Cancel
Save