mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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:
parent
8b350066c1
commit
de7e3ab607
2 changed files with 14 additions and 6 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue