Fix missing lazy logging format calls.
Not sure how I missed these.
This commit is contained in:
parent
72780e7737
commit
4ee90cd6e4
@ -60,7 +60,7 @@ class KeepAliveHandler(threading.Thread):
|
|||||||
self.interval = interval
|
self.interval = interval
|
||||||
self.daemon = True
|
self.daemon = True
|
||||||
self.shard_id = shard_id
|
self.shard_id = shard_id
|
||||||
self.msg = 'Keeping websocket alive with sequence {0[d]}'
|
self.msg = 'Keeping websocket alive with sequence %s.'
|
||||||
self._stop_ev = threading.Event()
|
self._stop_ev = threading.Event()
|
||||||
self._last_ack = time.time()
|
self._last_ack = time.time()
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ class KeepAliveHandler(threading.Thread):
|
|||||||
return
|
return
|
||||||
|
|
||||||
data = self.get_payload()
|
data = self.get_payload()
|
||||||
log.debug(self.msg.format(data))
|
log.debug(self.msg, data['d'])
|
||||||
coro = self.ws.send_as_json(data)
|
coro = self.ws.send_as_json(data)
|
||||||
f = compat.run_coroutine_threadsafe(coro, loop=self.ws.loop)
|
f = compat.run_coroutine_threadsafe(coro, loop=self.ws.loop)
|
||||||
try:
|
try:
|
||||||
@ -104,7 +104,7 @@ class KeepAliveHandler(threading.Thread):
|
|||||||
class VoiceKeepAliveHandler(KeepAliveHandler):
|
class VoiceKeepAliveHandler(KeepAliveHandler):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.msg = 'Keeping voice websocket alive with timestamp {0[d]}'
|
self.msg = 'Keeping voice websocket alive with timestamp %s.'
|
||||||
|
|
||||||
def get_payload(self):
|
def get_payload(self):
|
||||||
return {
|
return {
|
||||||
@ -465,7 +465,7 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol):
|
|||||||
}
|
}
|
||||||
|
|
||||||
sent = utils.to_json(payload)
|
sent = utils.to_json(payload)
|
||||||
log.debug('Sending "{}" to change status'.format(sent))
|
log.debug('Sending "%s" to change status', sent)
|
||||||
yield from self.send(sent)
|
yield from self.send(sent)
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
@ -619,7 +619,7 @@ class DiscordVoiceWebSocket(websockets.client.WebSocketClientProtocol):
|
|||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def received_message(self, msg):
|
def received_message(self, msg):
|
||||||
log.debug('Voice websocket frame received: {}'.format(msg))
|
log.debug('Voice websocket frame received: %s', msg)
|
||||||
op = msg['op']
|
op = msg['op']
|
||||||
data = msg.get('d')
|
data = msg.get('d')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user