mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
Replace root logger calls with module-specific loggers
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user