Logging fixes.

This commit is contained in:
BuildTools 2021-04-11 14:46:11 +02:00
parent 4f6ba1ac9e
commit 044370be5f
2 changed files with 6 additions and 2 deletions

View file

@ -43,7 +43,9 @@ quirkloader = ScriptQuirks()
quirkloader.add(PythonQuirks())
quirkloader.add(LuaQuirks())
quirkloader.loadAll()
logging.info(quirkloader.funcre())
# Quirks are already listed in quirks.py, so logging is redundant here.
#logging.debug(quirkloader.funcre())
quirkloader.funcre()
_functionre = re.compile(r"%s" % quirkloader.funcre())
_groupre = re.compile(r"\\([0-9]+)")

View file

@ -31,7 +31,9 @@ class ScriptQuirks(object):
del self.quirks[k]
#print self.quirks
if self.quirks:
logging.info('Registered quirks:', '(), '.join(self.quirks) + "()")
# See https://stackoverflow.com/questions/12843099/python-logging-typeerror-not-all-arguments-converted-during-string-formatting
reg_quirks = ('Registered quirks:', '(), '.join(self.quirks) + "()")
logging.info(reg_quirks)
else:
logging.warning("Couldn't find any script quirks")