From 00a3319725286e10ede23cf7fb48cbc2cfedde77 Mon Sep 17 00:00:00 2001 From: Brendon Smith Date: Wed, 19 Aug 2020 23:18:56 -0400 Subject: [PATCH] Restrict Gunicorn configuration output to debug There's a `print()` command in gunicorn_conf.py that prints the custom Gunicorn configuration not output by Gunicorn with `LOG_LEVEL="debug"`. This commit will only run the `print()` command if `LOG_LEVEL="debug"`. --- inboard/gunicorn_conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inboard/gunicorn_conf.py b/inboard/gunicorn_conf.py index 83ebf6d..e295fc5 100644 --- a/inboard/gunicorn_conf.py +++ b/inboard/gunicorn_conf.py @@ -69,5 +69,5 @@ "errorlog": errorlog, "accesslog": accesslog, } - -print(f"[{Path(__file__).stem}] Additional configuration:", json.dumps(log_data)) +if loglevel == "debug": + print(f"[{Path(__file__).stem}] Custom configuration:", json.dumps(log_data))