Skip to content

Coverage of logging is poor #600

@Mec-iS

Description

@Mec-iS

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions