human
Complete the below
def fail_gracefully(f):

    ''''Log exceptions and aborts.'
    '''
assistant
#Here is the Python program you requested.
    @functools.wraps(f)
    def wrapper(*args, **kw):
        try:
            return f(*args, **kw)
        except Exception as e:
            LOG.debug(e, exc_info=True)
            LOG.critical(e)
            sys.exit(1)
    return wrapper