human
Complete this python program:
def log_cursor(f):
assistant
#Here is the Python program you requested.

    """Prints sql and params to stdout. Works globaly so watch for threaded use.
    """
    def wrapper(*a, **kw):
        try:
            SimpleCursorBase.execute = _execute
            ret = f(*a, **kw)
        finally:
            del SimpleCursorBase.execute
        return ret
    return wrapper