In debug mode, display the last stack element to be able to trace
This commit is contained in:
parent
4cd099e087
commit
c3c7484792
1 changed files with 2 additions and 1 deletions
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import queue
|
import queue
|
||||||
|
import traceback
|
||||||
|
|
||||||
from nemubot.bot import sync_act
|
from nemubot.bot import sync_act
|
||||||
|
|
||||||
|
@ -84,7 +85,7 @@ class AbstractServer:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self._sending_queue.put(self.format(message))
|
self._sending_queue.put(self.format(message))
|
||||||
self._logger.debug("Message '%s' appended to write queue", message)
|
self._logger.debug("Message '%s' appended to write queue coming from %s:%d in %s", message, *traceback.extract_stack(limit=3)[0][:3])
|
||||||
sync_act("sckt", "write", self._fd.fileno())
|
sync_act("sckt", "write", self._fd.fileno())
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue