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
@@ -22,6 +22,8 @@ from core.utils import safe_json_dumps
from data.lookup_credentials import extract_credentials
from data.sig_ref import SIGRef
logger = logging.getLogger(__name__)
class APILookupCallHandler(tornado.web.RequestHandler):
"""API request handler for /api/v2/lookup/call"""
@@ -66,7 +68,7 @@ class APILookupCallHandler(tornado.web.RequestHandler):
self.set_status(422)
except Exception:
logging.exception("Exception when handling client request to call lookup API")
logger.exception("Exception when handling client request to call lookup API")
self.write(safe_json_dumps("Error - an internal server error occurred."))
self.set_status(500)
@@ -124,7 +126,7 @@ class APILookupSIGRefHandler(tornado.web.RequestHandler):
self.set_status(422)
except Exception:
logging.exception("Exception when handling client request to sig ref lookup API")
logger.exception("Exception when handling client request to sig ref lookup API")
self.write(safe_json_dumps("Error - an internal server error occurred."))
self.set_status(500)
@@ -192,7 +194,7 @@ class APILookupGridHandler(tornado.web.RequestHandler):
self.set_status(422)
except Exception:
logging.exception("Exception when handling client request to grid ref lookup API")
logger.exception("Exception when handling client request to grid ref lookup API")
self.write(safe_json_dumps("Error - an internal server error occurred."))
self.set_status(500)