Discriminate XML debugging

This commit is contained in:
Philip Prindeville 2024-01-04 11:42:26 -07:00 committed by Olof Hagsand
parent af77da38bb
commit 11e28eedec
6 changed files with 9 additions and 9 deletions

View file

@ -1183,7 +1183,7 @@ api_path2xml_vec(char **vec,
ok:
retval = 1; /* OK */
done:
clixon_debug(CLIXON_DBG_DETAIL, "%s retval:%d", __FUNCTION__, retval);
clixon_debug(CLIXON_DBG_XML | CLIXON_DBG_DETAIL, "%s retval:%d", __FUNCTION__, retval);
if (xpath)
free(xpath);
if (nsc)
@ -1252,7 +1252,7 @@ api_path2xml(char *api_path,
cxobj *xroot;
cbuf *cberr = NULL;
clixon_debug(CLIXON_DBG_DETAIL, "%s api_path:%s", __FUNCTION__, api_path);
clixon_debug(CLIXON_DBG_XML | CLIXON_DBG_DETAIL, "%s api_path:%s", __FUNCTION__, api_path);
if ((cberr = cbuf_new()) == NULL){
clixon_err(OE_UNIX, errno, "cbuf_new");
goto done;

View file

@ -314,7 +314,7 @@ changelog_op(clixon_handle h,
return retval;
fail:
retval = 0;
clixon_debug(CLIXON_DBG_DEFAULT, "%s fail op:%s ", __FUNCTION__, op);
clixon_debug(CLIXON_DBG_XML, "%s fail op:%s", __FUNCTION__, op);
goto done;
}
@ -349,7 +349,7 @@ changelog_iterate(clixon_handle h,
}
retval = 1;
done:
clixon_debug(CLIXON_DBG_DEFAULT, "%s retval: %d", __FUNCTION__, retval);
clixon_debug(CLIXON_DBG_XML, "%s retval: %d", __FUNCTION__, retval);
if (vec)
free(vec);
return retval;

View file

@ -178,7 +178,7 @@ xml_default_choice(yang_stmt *yc,
yang_stmt *yca = NULL;
yang_stmt *ydef;
clixon_debug(CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_XML | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
/* 1. Is there a default case and no child under this choice?
*/
x = NULL;

View file

@ -577,7 +577,7 @@ _xml_parse(const char *str,
int failed = 0; /* yang assignment */
int i;
clixon_debug(CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_XML | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
if (strlen(str) == 0){
return 1; /* OK */
}

View file

@ -212,8 +212,8 @@ xml2cvec(cxobj *xt,
}
}
}
if (clixon_debug_get() > 1){
clixon_debug(CLIXON_DBG_DETAIL, "%s cvv:\n", __FUNCTION__);
if (clixon_debug_isset(CLIXON_DBG_XML | CLIXON_DBG_DETAIL)){
clixon_debug(CLIXON_DBG_ALWAYS, "%s cvv:", __FUNCTION__);
cvec_print(stderr, cvv);
}
*cvv0 = cvv;

View file

@ -386,7 +386,7 @@ xml_cmp(cxobj *x1,
break;
} /* switch */
done:
clixon_debug(CLIXON_DBG_DETAIL2, "%s %s %s eq:%d nr: %d %d yi: %d %d", __FUNCTION__, xml_name(x1), xml_name(x2), equal, nr1, nr2, yi1, yi2);
clixon_debug(CLIXON_DBG_XML | CLIXON_DBG_DETAIL2, "%s %s %s eq:%d nr: %d %d yi: %d %d", __FUNCTION__, xml_name(x1), xml_name(x2), equal, nr1, nr2, yi1, yi2);
return equal;
}