Add more logging

This commit is contained in:
Darks 2022-04-12 23:34:32 +02:00
parent 43cae42f57
commit 6ee35ec279
Signed by: Darks
GPG Key ID: 7515644268BE1433
3 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,7 @@ from sasl import nick, password
from users import USERS
LOG_FORMAT = "%(asctime)s [%(levelname)s] <%(filename)s> %(funcName)s: %(message)s"
LOG_FORMAT = "%(asctime)s [%(levelname)s] %(threadName)s <%(filename)s> %(funcName)s: %(message)s"
logging.basicConfig(format=LOG_FORMAT, level=logging.DEBUG)
channels = ["hs", "projets", "annonces"]

2
irc.py
View File

@ -30,6 +30,7 @@ class IRC(object):
""" Start the IRC layer. Manage authentication as well """
sasl_nick = sasl_nick or nick
self.running = True
logging.debug("Thread start")
self._handler.start()
self._send(f"USER {nick} * * :{nick}")
@ -110,7 +111,6 @@ class IRC(object):
elif len(m):
if store:
self._inbox.put(m)
logging.debug(f"received {m}")
def _send(self, raw):
""" Wrap and encode raw message to send """

View File

@ -27,6 +27,7 @@ class Shoutbox(object):
def run(self):
self.running = True
logging.debug("Thread start")
self._handler.start()
def stop(self):