modules/backend/lambda-src/utils.py
def audit_logging_handler(handler):
    """
    Wrapper for logging calls parameters and results.
    """

    @functools.wraps(handler)
    def inner(*args, **kwargs):
        # Ignoring the Lambda context for logging purposes
        try:
            result = handler(*args, **kwargs)
            logger.info({"event": args[0], "response": result, "type": "SUCCESS", "audit": 1})
            return result
        except Exception as e:
            logger.info({"event": args[0], "response": str(e), "type": "ERROR", "audit": 1})
            raise

    return inner

    Wrapper for logging calls parameters and results.
    
Wrapper for logging calls parameters and results.
Wrapper for logging calls parameters and results .
def audit_logging_handler(handler):
    @functools.wraps(handler)
    def inner(*args, **kwargs):
        try:
            result = handler(*args, **kwargs)
            logger.info({"event": args[0], "response": result, "type": "SUCCESS", "audit": 1})
            return result
        except Exception as e:
            logger.info({"event": args[0], "response": str(e), "type": "ERROR", "audit": 1})
            raise
    return inner
def audit_logging_handler ( handler ) : @ functools . wraps ( handler ) def inner ( * args , ** kwargs ) : try : result = handler ( * args , ** kwargs ) logger . info ( { "event" : args [ 0 ] , "response" : result , "type" : "SUCCESS" , "audit" : 1 } ) return result except Exception as e : logger . info ( { "event" : args [ 0 ] , "response" : str ( e ) , "type" : "ERROR" , "audit" : 1 } ) raise return inner
Wrapper for logging calls parameters and results.
Wrapper for logging calls parameters and results .
"""
    Wrapper for logging calls parameters and results.
    """ # Ignoring the Lambda context for logging purposes
handler