diff options
| author | Frederick Muriuki Muriithi | 2026-04-13 14:33:39 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-04-13 14:33:39 -0500 |
| commit | af62ff14574d708a138b011a7089e085c4ad183c (patch) | |
| tree | 04a6de162fd610bddbe5fe8f0d8c6d13003ff88b /uploader/__init__.py | |
| parent | d71a40a518f1dd7ed8ef29affa314962d63e88b2 (diff) | |
| download | gn-uploader-af62ff14574d708a138b011a7089e085c4ad183c.tar.gz | |
Pick loggable modules from the application configurations.
To avoid having to modify code just to activate logging in a specific module, this commit makes the list of loggable modules into a configuration variable that can be loaded at startup.
Diffstat (limited to 'uploader/__init__.py')
| -rw-r--r-- | uploader/__init__.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/uploader/__init__.py b/uploader/__init__.py index e00c726..afaa78d 100644 --- a/uploader/__init__.py +++ b/uploader/__init__.py @@ -131,13 +131,8 @@ def create_app(config: Optional[dict] = None): default_timeout=int(app.config["SESSION_FILESYSTEM_CACHE_TIMEOUT"])) setup_logging(app) - setup_modules_logging(app.logger, ( - "uploader.base_routes", - "uploader.flask_extensions", - "uploader.publications.models", - "uploader.publications.datatables", - "uploader.phenotypes.models", - "uploader.phenotypes.views")) + setup_modules_logging( + app.logger, tuple(app.config.get("LOGGABLE_MODULES", []))) # setup jinja2 symbols app.add_template_global(user_logged_in) |
