move logging config to the top again

This commit is contained in:
Jakob Ketterl 2021-04-27 00:53:45 +02:00
parent 96ada02e38
commit d97d66c787

View File

@ -1,3 +1,9 @@
import logging
# the linter will complain about this, but the logging must be configured before importing all the other modules
logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
logger = logging.getLogger(__name__)
from http.server import HTTPServer
from owrx.http import RequestHandler
from owrx.config.core import CoreConfig
@ -15,11 +21,6 @@ from owrx.admin import add_admin_parser, run_admin_action
import signal
import argparse
import logging
logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
logger = logging.getLogger(__name__)
class ThreadedHttpServer(ThreadingMixIn, HTTPServer):
pass