aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-04-10 07:37:16 +0300
committerFrederick Muriuki Muriithi2024-04-10 07:37:16 +0300
commit8a323151f21ae4331c47054eb3c5cffcd0f46eda (patch)
tree9b51588f719b01e07c862c6beef45382fab3d06f
parent57bf9ae01f1993d8bb29e7cb6a3bdb822bade80c (diff)
downloadgn-machines-8a323151f21ae4331c47054eb3c5cffcd0f46eda.tar.gz
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.
-rw-r--r--genenetwork/services/genenetwork.scm8
-rw-r--r--uploader.scm3
2 files changed, 7 insertions, 4 deletions
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{<genenetwork-configuration>} record."
(define (gn-uploader-gunicorn-app config)
(match-record config <gn-uploader-configuration>
- (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{<genenetwork-configuration>} 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)
diff --git a/uploader.scm b/uploader.scm
index 9cf8350..5d07feb 100644
--- a/uploader.scm
+++ b/uploader.scm
@@ -72,5 +72,6 @@
(server-name "staging-uploader.genenetwork.org")
(port 10897)
(sql-uri "mysql://webqtlout:webqtlout@127.0.0.1:3307/db_webqtl")
- (data-directory "/export/data/uploader/gn-uploader")))
+ (data-directory "/export/data/uploader/gn-uploader")
+ (log-level "DEBUG")))
%base-services)))