This commit is contained in:
iFargle
2023-02-27 21:24:37 +09:00
parent b90266afd6
commit be78e2bfdf
4 changed files with 5 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ from dateutil import parser
from flask import Flask
app = Flask(__name__)
LOG = logging.getLogger(__name__)
LOG = logging.getLogger("app")
##################################################################
# Functions related to HEADSCALE and API KEYS

View File

@@ -1,10 +1,10 @@
# pylint: disable=wrong-import-order
import os, headscale, requests, logging
from flask import Flask
from flask import Flask
app = Flask(__name__)
LOG = logging.getLogger(__name__)
LOG = logging.getLogger("app")
def pretty_print_duration(duration, delta_type=""):
""" Prints a duration in human-readable formats """

View File

@@ -8,7 +8,7 @@ from concurrent.futures import ALL_COMPLETED, wait
from flask_executor import Executor
app = Flask(__name__)
LOG = logging.getLogger(__name__)
LOG = logging.getLogger("app")
executor = Executor(app)
def render_overview():

View File

@@ -35,9 +35,8 @@ dictConfig({
}
})
app = Flask(__name__, static_url_path="/static")
app = Flask("app", static_url_path="/static")
LOG = logging.create_logger(app)
LOG.setLevel(LOG_LEVEL)
executor = Executor(app)
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_prefix=1)