From 60db81b9f1fc809e112b5faba359ab3df45f9847 Mon Sep 17 00:00:00 2001 From: Mark Price Date: Thu, 11 Jan 2024 14:35:56 +0000 Subject: [PATCH] Making logging level configurable (#406) * Making logging level configurable * auto patch increment --------- Co-authored-by: ras-rm-pr-bot --- _infra/helm/secure-message/Chart.yaml | 4 ++-- _infra/helm/secure-message/templates/deployment.yaml | 2 ++ _infra/helm/secure-message/values.yaml | 4 ++++ config.py | 3 ++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/_infra/helm/secure-message/Chart.yaml b/_infra/helm/secure-message/Chart.yaml index 102ea946..6abb8f42 100644 --- a/_infra/helm/secure-message/Chart.yaml +++ b/_infra/helm/secure-message/Chart.yaml @@ -14,8 +14,8 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 2.1.62 +version: 2.1.63 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. -appVersion: 2.1.62 +appVersion: 2.1.63 diff --git a/_infra/helm/secure-message/templates/deployment.yaml b/_infra/helm/secure-message/templates/deployment.yaml index f5065540..8eccb6d4 100644 --- a/_infra/helm/secure-message/templates/deployment.yaml +++ b/_infra/helm/secure-message/templates/deployment.yaml @@ -185,5 +185,7 @@ spec: secretKeyRef: name: secure-message key: client-secret + - name: LOGGING_LEVEL + value: "{{ .Values.app.config.loggingLevel }}" resources: {{ toYaml .Values.resources.application | nindent 12 }} diff --git a/_infra/helm/secure-message/values.yaml b/_infra/helm/secure-message/values.yaml index bf55e037..40697b01 100644 --- a/_infra/helm/secure-message/values.yaml +++ b/_infra/helm/secure-message/values.yaml @@ -61,3 +61,7 @@ gcp: dns: enabled: false wellKnownPort: 8080 + +app: + config: + loggingLevel: "INFO" diff --git a/config.py b/config.py index 9a31144c..4e6748b0 100644 --- a/config.py +++ b/config.py @@ -15,7 +15,7 @@ class Config: VERSION = "1.3.0" DATABASE_URL = os.getenv("DATABASE_URL", "postgresql://postgres:postgres@localhost:5432") - LOGGING_LEVEL = os.getenv("LOGGING_LEVEL", "DEBUG") + LOGGING_LEVEL = os.getenv("LOGGING_LEVEL", "INFO") # EMAIL NOTIFICATION SETTINGS NOTIFY_VIA_GOV_NOTIFY = os.getenv("NOTIFY_VIA_GOV_NOTIFY") @@ -58,6 +58,7 @@ class Config: class DevConfig(Config): + LOGGING_LEVEL = os.getenv("LOGGING_LEVEL", "DEBUG") JWT_SECRET = os.getenv("JWT_SECRET", "testsecret") NOTIFY_VIA_GOV_NOTIFY = os.getenv("NOTIFY_VIA_GOV_NOTIFY", "0") NOTIFICATION_TEMPLATE_ID = os.getenv("NOTIFICATION_TEMPLATE_ID", "test_notification_template_id")