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:
@@ -10,6 +10,8 @@ from tornado.web import Application
|
||||
from core.prometheus_metrics_handler import api_requests_counter
|
||||
from core.utils import safe_json_dumps
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class APISolarConditionsHandler(tornado.web.RequestHandler):
|
||||
"""API request handler for /api/v2/solar"""
|
||||
@@ -42,6 +44,6 @@ class APISolarConditionsHandler(tornado.web.RequestHandler):
|
||||
self.set_header("Content-Type", "application/json")
|
||||
|
||||
except Exception:
|
||||
logging.exception("Exception when handling client request to solar conditions API")
|
||||
logger.exception("Exception when handling client request to solar conditions API")
|
||||
self.write(safe_json_dumps("Error - an internal server error occurred."))
|
||||
self.set_status(500)
|
||||
|
||||
Reference in New Issue
Block a user