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

@ -51,8 +51,6 @@ int notfound(FCGX_Request *r);
int conflict(FCGX_Request *r);
int internal_server_error(FCGX_Request *r);
int notimplemented(FCGX_Request *r);
int clicon_debug_xml(int dbglevel, char *str, cxobj *cx);
int test(FCGX_Request *r, int dbg);
cbuf *readdata(FCGX_Request *r);
int get_user_cookie(char *cookiestr, char *attribute, char **val);

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

View file

@ -56,7 +56,6 @@ int conflict(FCGX_Request *r);
int internal_server_error(FCGX_Request *r);
int notimplemented(FCGX_Request *r);
int clicon_debug_xml(int dbglevel, char *str, cxobj *cx);
int test(FCGX_Request *r, int dbg);
cbuf *readdata(FCGX_Request *r);
int get_user_cookie(char *cookiestr, char *attribute, char **val);