Add TRACE log level

This is useful for when we want important debug messages, but not
necessarily to be flooded with every message that comes through IRC

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2024-07-18 11:02:02 -07:00
parent f700c0f34c
commit 40a859083a
2 changed files with 15 additions and 1 deletions

View File

@@ -82,7 +82,7 @@ class ServerConfig:
if "loglevel" in obj:
if not isinstance(obj["loglevel"], str):
raise ConfigError("loglevel", "must be a string")
loglevels = ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]
loglevels = ["TRACE", "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]
if obj["loglevel"] not in loglevels:
raise ConfigError("loglevel", "must be one of: " + " ".join(loglevels))
self.loglevel = obj["loglevel"]