Due to a scheduled upgrade to version 14.10, GitLab will be unavailabe on Monday 30.05., from 19:00 until 20:00.

Commit e604e105 authored by Matthias's avatar Matthias
Browse files

improve logging

parent 592b4583
Pipeline #25888 passed with stages
in 2 minutes and 1 second
...@@ -8,6 +8,8 @@ k8sRequestsMemory: "128Mi" ...@@ -8,6 +8,8 @@ k8sRequestsMemory: "128Mi"
k8sLimitsCpu: "0.4" k8sLimitsCpu: "0.4"
k8sLimitsMemory: "256Mi" k8sLimitsMemory: "256Mi"
logLevel: DEBUG
drupalApiCredentials: drupal-live-api-credentials drupalApiCredentials: drupal-live-api-credentials
sftpConfigs: internal-sftp-config sftpConfigs: internal-sftp-config
kafkaConfigs: prod-kafka-bootstrap-servers kafkaConfigs: prod-kafka-bootstrap-servers
......
...@@ -8,6 +8,8 @@ k8sRequestsMemory: "128Mi" ...@@ -8,6 +8,8 @@ k8sRequestsMemory: "128Mi"
k8sLimitsCpu: "0.4" k8sLimitsCpu: "0.4"
k8sLimitsMemory: "256Mi" k8sLimitsMemory: "256Mi"
logLevel: DEBUG
drupalApiCredentials: drupal-api-credentials drupalApiCredentials: drupal-api-credentials
sftpConfigs: internal-sftp-config sftpConfigs: internal-sftp-config
kafkaConfigs: stage-kafka-bootstrap-servers kafkaConfigs: stage-kafka-bootstrap-servers
......
...@@ -8,6 +8,8 @@ k8sRequestsMemory: "128Mi" ...@@ -8,6 +8,8 @@ k8sRequestsMemory: "128Mi"
k8sLimitsCpu: "0.4" k8sLimitsCpu: "0.4"
k8sLimitsMemory: "256Mi" k8sLimitsMemory: "256Mi"
logLevel: DEBUG
drupalApiCredentials: drupal-api-credentials drupalApiCredentials: drupal-api-credentials
sftpConfigs: internal-sftp-config sftpConfigs: internal-sftp-config
kafkaConfigs: test-kafka-bootstrap-servers kafkaConfigs: test-kafka-bootstrap-servers
......
...@@ -11,4 +11,5 @@ data: ...@@ -11,4 +11,5 @@ data:
IMPORT_API_URL: {{ .Values.importApiUrl }} IMPORT_API_URL: {{ .Values.importApiUrl }}
DRUPAL_API_URL: {{ .Values.drupalApiUrl }} DRUPAL_API_URL: {{ .Values.drupalApiUrl }}
TOPIC_CONFIGS: {{ .Values.topicConfigs }} TOPIC_CONFIGS: {{ .Values.topicConfigs }}
TOPIC_DRUPAL_EXPORT: {{ .Values.topicDrupalExport }} TOPIC_DRUPAL_EXPORT: {{ .Values.topicDrupalExport }}
\ No newline at end of file LOG_LEVEL: "{{ .Values.logLevel }}"
from import_api_app import create_app from import_api_app import create_app
import logging
import os
if __name__ == "__main__": if __name__ == "__main__":
numeric_level = getattr(logging, os.getenv('LOG_LEVEL').upper(), None)
if not isinstance(numeric_level, int):
raise ValueError(f'Invalid log level: {os.getenv("LOG_LEVEL")}')
logging.basicConfig(format='%(levelname)-8s [%(filename)s:%(lineno)d] %(message)s',
level=numeric_level)
app = create_app() app = create_app()
app.run(host='0.0.0.0', debug=True) app.run(host='0.0.0.0', debug=True)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment