From 8a323151f21ae4331c47054eb3c5cffcd0f46eda Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 10 Apr 2024 07:37:16 +0300 Subject: gn-uploader: Enable changing of log-level for container. This commit enables us to change the logging level of the gn-uploader service within the container: this will help in the instances when we need to debug events in the application that are unexpected. --- genenetwork/services/genenetwork.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'genenetwork') diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm index af0c3fc..e3462d6 100644 --- a/genenetwork/services/genenetwork.scm +++ b/genenetwork/services/genenetwork.scm @@ -113,7 +113,8 @@ (data-directory gn-uploader-configuration-data-directory (default "/var/genenetwork")) (secrets gn-uploader-configuration-secrets - (default "/etc/genenetwork/gn-uploader-secrets.py"))) + (default "/etc/genenetwork/gn-uploader-secrets.py")) + (log-level gn-uploader-log-level (default "WARNING"))) (define %genenetwork-accounts (list (user-group @@ -408,7 +409,7 @@ a @code{} record." (define (gn-uploader-gunicorn-app config) (match-record config - (gn-uploader sql-uri port data-directory secrets) + (gn-uploader sql-uri port data-directory secrets log-level) ;; If we mapped only the mysqld.sock socket file, it would break ;; when the external mysqld server is restarted. (let ((database-mapping (file-system-mapping @@ -420,7 +421,8 @@ a @code{} record." `(("QCAPP_SECRETS" ,secrets) ("SQL_URI" ,sql-uri) ("UPLOAD_FOLDER" ,(string-append data-directory - "/uploads"))))))) + "/uploads")) + ("LOG_LEVEL" ,log-level)))))) (list (gunicorn-app (name "gn-uploader") (package gn-uploader) -- cgit v1.2.3