Logs error

    :param error: error to log
    :param cause: (optional) cause of error

def log_error(*error, cause=None):
    """Logs error

    :param error: error to log
    :param cause: (optional) cause of error
    """
    thread_id = threading.current_thread().ident
    text = " ".join(error)
    if cause:
        text += " due to " + str(cause)

    logger = get_logger()
    logger.error(LOG_THREAD_FORMAT.format(thread_id, text))