Skip to content

Commit

Permalink
improve error log
Browse files Browse the repository at this point in the history
  • Loading branch information
marceloarocha committed Jan 29, 2025
1 parent bd53827 commit 49dd62f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion decorators/api_endpoint_decorator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import logging
import inspect
from flask import g
from flask import g, request
from flask_jwt_extended import get_jwt_identity, verify_jwt_in_request, get_jwt
from flask_jwt_extended.exceptions import JWTExtendedException
from jwt.exceptions import PyJWTError
Expand Down Expand Up @@ -96,6 +96,7 @@ def decorator_f(*args, **kwargs):
logging.basicConfig()
logger = logging.getLogger("noharm.backend")
logger.exception(str(e))
logger.error("Request data: %s", request.get_data())

return {
"status": "error",
Expand Down

0 comments on commit 49dd62f

Please sign in to comment.