human
Complete the below
def log_and_ignore_errors(msg):

    ''''A decorator for wrapping functions in a \'log exception and ignore\'
    try-except block.'
    '''
 Write me a the Python code you requested?
assistant
#Here is the Python code you requested.
    def decorator(fn):
        def decorated_func(*args, **dargs):
            try:
                fn(*args, **dargs)
            except Exception:
                print msg
                traceback.print_exc(file=sys.stdout)
        return decorated_func
    return decorator