fix(logging): restore aurweb logger; null out root logger

After actually digging into how the logger does things,
since the root logger is required and we have specific
level-changing loggers for our components, we must no-op
the root logger to avoid it duplicating logs from the others.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-12-06 22:35:22 -08:00
parent 8b350066c1
commit de7e3ab607
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
2 changed files with 14 additions and 6 deletions

View file

@ -8,6 +8,7 @@ aurwebdir = aurweb.config.get("options", "aurwebdir")
config_path = os.path.join(aurwebdir, "logging.conf")
logging.config.fileConfig(config_path, disable_existing_loggers=False)
logging.getLogger("root").addHandler(logging.NullHandler())
def get_logger(name: str) -> logging.Logger: