Added new log function: clicon_log_xml() for logging XML tree

This commit is contained in:
Olof hagsand 2019-02-13 11:35:49 +01:00
parent 2ca1c1292c
commit ea8c84a372
9 changed files with 79 additions and 26 deletions

View file

@ -284,26 +284,6 @@ notimplemented(FCGX_Request *r)
return 0;
}
/*! Specialization of clicon_debug with xml tree */
int
clicon_debug_xml(int dbglevel,
char *str,
cxobj *x)
{
int retval = -1;
cbuf *cb;
if ((cb = cbuf_new()) == NULL)
goto done;
if (clicon_xml2cbuf(cb, x, 0, 0) < 0)
goto done;
clicon_debug(1, "%s %s", str, cbuf_get(cb));
retval = 0;
done:
if (cb!=NULL)
cbuf_free(cb);
return retval;
}
/*!
* @param[in] r Fastcgi request handle