[UI] use only one logger adapter and update Dockerfile (#2646)

* [UI] use only one logger adapter and update Dockerfile
* remove setLevel on logger
This commit is contained in:
Felix Kunde
2024-05-31 11:24:31 +02:00
committed by GitHub
parent 1210ceca72
commit d60b424d79
7 changed files with 64 additions and 65 deletions
+2 -14
View File
@@ -1,13 +1,8 @@
#!/usr/bin/env python3
# pylama:ignore=E402
import gevent.monkey
gevent.monkey.patch_all()
import requests
import tokens
import sys
from backoff import expo, on_exception
from click import ParamType, command, echo, option
@@ -25,7 +20,6 @@ from gevent import sleep, spawn
from gevent.pywsgi import WSGIServer
from jq import jq
from json import dumps, loads
from logging import DEBUG, ERROR, INFO, basicConfig, exception, getLogger
from os import getenv
from re import X, compile
from requests.exceptions import RequestException
@@ -56,11 +50,7 @@ from .utils import (
these,
)
# Disable access logs from Flask
getLogger('gevent').setLevel(ERROR)
logger = getLogger(__name__)
from operator_ui.adapters.logger import logger
SERVER_STATUS = {'shutdown': False}
@@ -77,7 +67,7 @@ SPILO_S3_BACKUP_PREFIX = getenv('SPILO_S3_BACKUP_PREFIX', 'spilo/')
SUPERUSER_TEAM = getenv('SUPERUSER_TEAM', 'acid')
TARGET_NAMESPACE = getenv('TARGET_NAMESPACE')
GOOGLE_ANALYTICS = getenv('GOOGLE_ANALYTICS', False)
MIN_PODS= getenv('MIN_PODS', 2)
MIN_PODS = getenv('MIN_PODS', 2)
RESOURCES_VISIBLE = getenv('RESOURCES_VISIBLE', True)
CUSTOM_MESSAGE_RED = getenv('CUSTOM_MESSAGE_RED', '')
@@ -984,8 +974,6 @@ def init_cluster():
def main(port, debug, clusters: list):
global TARGET_NAMESPACE
basicConfig(stream=sys.stdout, level=(DEBUG if debug else INFO), format='%(asctime)s %(levelname)s: %(message)s',)
init_cluster()
logger.info(f'App URL: {APP_URL}')