Log full stack trace on socket connection errors when debug logging
Might help bring some clarity for #1523
This commit is contained in:
parent
e038cfa4dc
commit
bc0880711b
1 changed files with 4 additions and 1 deletions
|
|
@ -203,4 +203,7 @@ class PrinterStateConnection(sockjs.tornado.SockJSConnection, octoprint.printer.
|
|||
try:
|
||||
self.send({type: payload})
|
||||
except Exception as e:
|
||||
self._logger.warn("Could not send message to client %s: %s" % (self._remoteAddress, str(e)))
|
||||
if self._logger.isEnabledFor(logging.DEBUG):
|
||||
self._logger.exception("Could not send message to client {}".format(self._remoteAddress))
|
||||
else:
|
||||
self._logger.warn("Could not send message to client {}: {}".format(self._remoteAddress, e))
|
||||
|
|
|
|||
Loading…
Reference in a new issue