mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
This resolves logging issues with alembic on aurweb.initdb in addition to adding more logging utilities for aurweb and tests in general. Developers should fetch a logger for their specific module via `logging.getLogger(__name__)`. Signed-off-by: Kevin Morris <kevr@0cost.org>
11 lines
287 B
Python
11 lines
287 B
Python
import logging
|
|
import logging.config
|
|
import os
|
|
|
|
import aurweb.config
|
|
|
|
aurwebdir = aurweb.config.get("options", "aurwebdir")
|
|
config_path = os.path.join(aurwebdir, "logging.conf")
|
|
|
|
logging.config.fileConfig(config_path, disable_existing_loggers=False)
|
|
logger = logging.getLogger(__name__)
|