From 0f3a7224759865955e78a98f8d8addba947c6bd6 Mon Sep 17 00:00:00 2001 From: Benjamin Ludwig Date: Fri, 15 Mar 2024 17:08:07 +0100 Subject: [PATCH] Allow configuring log level --- watcher/watcher.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/watcher/watcher.py b/watcher/watcher.py index 1af82cd..2d78b5c 100644 --- a/watcher/watcher.py +++ b/watcher/watcher.py @@ -46,6 +46,10 @@ def __init__(self, app, config, logger=logging.getLogger(__name__)): self.wsgi_config = config self.watcher_config = {} + loglevel = self.wsgi_config.get('loglevel', None) + if loglevel: + logger.setLevel(level=logging.__getattribute__(loglevel)) + self.cadf_service_name = self.wsgi_config.get('cadf_service_name', None) self.service_type = self.wsgi_config.get('service_type', taxonomy.UNKNOWN) # get the project uid from the request path or from the token (default)