diff --git a/headscale.py b/headscale.py index f9de822..40842c8 100644 --- a/headscale.py +++ b/headscale.py @@ -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 diff --git a/helper.py b/helper.py index 00ece3f..8fe8f77 100644 --- a/helper.py +++ b/helper.py @@ -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 """ diff --git a/renderer.py b/renderer.py index 9c163d9..fc09998 100644 --- a/renderer.py +++ b/renderer.py @@ -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(): diff --git a/server.py b/server.py index 56d99aa..846c45f 100644 --- a/server.py +++ b/server.py @@ -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)