DEBUG log IRCBot.connect failure stacktrace

This commit is contained in:
jesopo 2019-10-25 14:18:22 +01:00
parent 7d4c6b6941
commit 226ebe1f1f
2 changed files with 2 additions and 1 deletions

View file

@ -157,7 +157,7 @@ if len(server_configs):
for server in servers:
if not bot.connect(server):
log.error("Failed to connect to '%s'" % str(server))
log.error("Failed to connect to '%s'", [str(server)], exc_info=True)
if not args.startup_disconnects:
sys.exit(3)

View file

@ -203,6 +203,7 @@ class Bot(object):
except Exception as e:
self.log.warn("Failed to connect to %s: %s",
[str(server), str(e)])
self.log.debug("Connection failure reason:", exc_info=True)
return False
self.servers[server.fileno()] = server
self._read_poll.register(server.fileno(), select.POLLIN)