From 23c4e62e1f4f1e937c857e7f1bd990893fed0a23 Mon Sep 17 00:00:00 2001 From: Samet Demir Date: Tue, 12 Mar 2024 20:28:30 +0000 Subject: [PATCH] added more logs --- aviso-server/rest/aviso_rest/frontend.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aviso-server/rest/aviso_rest/frontend.py b/aviso-server/rest/aviso_rest/frontend.py index 2dc7db0..b88ccee 100644 --- a/aviso-server/rest/aviso_rest/frontend.py +++ b/aviso-server/rest/aviso_rest/frontend.py @@ -137,19 +137,21 @@ async def api_notify(request: Request): :param request: The incoming HTTP request with the notification. :return: A JSON response indicating the result of the notification processing. """ + logger.debug("New notification received") body = await request.json() if body is None: raise HTTPException(status_code=400, detail="Invalid notification, Body cannot be empty") - + logger.debug(body) try: notification = await frontend._parse_cloud_event(request) + logger.info(f"New event received: {notification}") if frontend._skip_request(notification, frontend.config.skips): logger.info("Notification skipped") return {"message": "Notification skipped"} # Implement the notification logic here. except InvalidInputError as e: raise HTTPException(status_code=400, detail=str(e)) - + logger.info("Notification successfully submitted") return {"message": "Notification successfully submitted"}