about summary refs log tree commit diff
path: root/gn3/loggers.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-08-12 10:51:12 -0500
committerFrederick Muriuki Muriithi2025-08-12 10:51:12 -0500
commitb743d3ff6e407c683b381f968e52f366c38424f4 (patch)
treec25606d46f9574a769fded5bfbb5ee5b3384e5a6 /gn3/loggers.py
parent31db1a4c7712b89bfc68db2c09a944b8a5fa94e7 (diff)
downloadgenenetwork3-b743d3ff6e407c683b381f968e52f366c38424f4.tar.gz
Setup module-specific loggers.
Diffstat (limited to 'gn3/loggers.py')
-rw-r--r--gn3/loggers.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/gn3/loggers.py b/gn3/loggers.py
index 5e52a9f..a34a5f4 100644
--- a/gn3/loggers.py
+++ b/gn3/loggers.py
@@ -10,6 +10,13 @@ def loglevel(app):
     """'Compute' the LOGLEVEL from the application."""
     return logging.DEBUG if app.config.get("DEBUG", False) else logging.WARNING
 
+
+def setup_modules_logging(level, modules):
+    for module in modules:
+        _logger = logging.getLogger(logger_name)
+        _logger.setLevel(loglevel)
+
+
 def setup_app_handlers(app):
     """Setup the logging handlers for the application `app`."""
     # ========== Setup handlers ==========