|
1 | 1 | #!/usr/bin/env python3 |
2 | 2 | # pylama:ignore=E402 |
3 | 3 |
|
4 | | -import gevent.monkey |
5 | | - |
6 | | -gevent.monkey.patch_all() |
7 | | - |
8 | 4 | import requests |
9 | 5 | import tokens |
10 | | -import sys |
11 | 6 |
|
12 | 7 | from backoff import expo, on_exception |
13 | 8 | from click import ParamType, command, echo, option |
|
25 | 20 | from gevent.pywsgi import WSGIServer |
26 | 21 | from jq import jq |
27 | 22 | from json import dumps, loads |
28 | | -from logging import DEBUG, ERROR, INFO, basicConfig, exception, getLogger |
29 | 23 | from os import getenv |
30 | 24 | from re import X, compile |
31 | 25 | from requests.exceptions import RequestException |
|
56 | 50 | these, |
57 | 51 | ) |
58 | 52 |
|
59 | | - |
60 | | -# Disable access logs from Flask |
61 | | -getLogger('gevent').setLevel(ERROR) |
62 | | - |
63 | | -logger = getLogger(__name__) |
| 53 | +from operator_ui.adapters.logger import logger |
64 | 54 |
|
65 | 55 | SERVER_STATUS = {'shutdown': False} |
66 | 56 |
|
|
77 | 67 | SUPERUSER_TEAM = getenv('SUPERUSER_TEAM', 'acid') |
78 | 68 | TARGET_NAMESPACE = getenv('TARGET_NAMESPACE') |
79 | 69 | GOOGLE_ANALYTICS = getenv('GOOGLE_ANALYTICS', False) |
80 | | -MIN_PODS= getenv('MIN_PODS', 2) |
| 70 | +MIN_PODS = getenv('MIN_PODS', 2) |
81 | 71 | RESOURCES_VISIBLE = getenv('RESOURCES_VISIBLE', True) |
82 | 72 | CUSTOM_MESSAGE_RED = getenv('CUSTOM_MESSAGE_RED', '') |
83 | 73 |
|
@@ -984,8 +974,6 @@ def init_cluster(): |
984 | 974 | def main(port, debug, clusters: list): |
985 | 975 | global TARGET_NAMESPACE |
986 | 976 |
|
987 | | - basicConfig(stream=sys.stdout, level=(DEBUG if debug else INFO), format='%(asctime)s %(levelname)s: %(message)s',) |
988 | | - |
989 | 977 | init_cluster() |
990 | 978 |
|
991 | 979 | logger.info(f'App URL: {APP_URL}') |
|
0 commit comments