import logging

def log_error(f):
    def wrap(*args, **kwargs):
        try:
            return f(*args, **kwargs)
        except Exception as e:
            logging.error(f"Error on: {f.__name__}")
            logging.error(f"args: {args}")
            logging.error(f"kwargs: {kwargs}")
            logging.error(f"Exception: {e}")
            raise e
    return wrap
