-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Labels
Description
I'm submitting a
- feature request.
Current Behaviour:
Logging is only present in app.py.
Logging is seldommly used. For example in the case of delete_collection_member:
try:
session.commit()
except InvalidRequestError:
session.rollback()
return collection_id
Expected Behaviour:
The function above issues a rollback without logging. Rolling back operations are importanto to highlight for maintance reason, so it should look like:
try:
session.commit()
except InvalidRequestError as e:
session.rollback()
logging.warning("Rollback in [function name] because of {str(e)}")
[raise 400]?
return collection_id
It would be nice to take this opportunity to implement structured logging with structlog