Replace root logger calls with module-specific loggers

This commit is contained in:
Ian Renton
2026-08-15 08:35:06 +01:00
parent 74bcd9cded
commit dd89ff4af7
64 changed files with 328 additions and 216 deletions
+5 -3
View File
@@ -12,6 +12,8 @@ from core.data_store import DATA_STORE
from core.status_reporter import StatusReporter
from server.webserver import WEB_SERVER
logger = logging.getLogger(__name__)
# Globals
run = True
@@ -21,7 +23,7 @@ def shutdown(_signum=None, _frame=None):
global run
logging.info("Stopping program...")
logger.info("Stopping program...")
WEB_SERVER.stop()
DATA_PROVIDERS.stop()
CLEANUP_TIMER.stop()
@@ -41,8 +43,8 @@ if __name__ == "__main__":
root.handlers.clear()
root.addHandler(handler)
logging.info("Starting...")
logging.info(f"This is Spothole version {SOFTWARE_VERSION}. This instance is run by {SERVER_OWNER_CALLSIGN}.")
logger.info("Starting...")
logger.info(f"This is Spothole version {SOFTWARE_VERSION}. This instance is run by {SERVER_OWNER_CALLSIGN}.")
# Shut down gracefully on SIGINT
signal.signal(signal.SIGINT, shutdown)