* Changed debug levels in clicon_debug() to be based on maskable flags
* Added flag names: `CLIXON_DBG_*`
* Added maskable flags that can be combined when debugging:
* `DEFAULT` = 1: Basic debug message, espcially initialization
* `MSG` = 2: Input and output packets, read datastore
* `DETAIL` = 4: Details: message dump in hex, xpath parse trees, etc
* `EXTRA` = 8: Extra detailed logs
* Test: some errors in yang-lib where content-id was in wrong place
This commit is contained in:
parent
8342b74968
commit
da9bfcbb53
47 changed files with 425 additions and 210 deletions
|
|
@ -2436,7 +2436,7 @@ clicon_log_xml(int level,
|
|||
* @param[in] x XML tree that is logged without prettyprint
|
||||
* @param[in] format Message to print as argv.
|
||||
* @see clicon_log_xml For syslog
|
||||
* @see clicon_debug base function
|
||||
* @see clicon_debug base function and see CLIXON_DBG_* flags
|
||||
*/
|
||||
int
|
||||
clicon_debug_xml(int dbglevel,
|
||||
|
|
@ -2450,7 +2450,8 @@ clicon_debug_xml(int dbglevel,
|
|||
int retval = -1;
|
||||
size_t trunc;
|
||||
|
||||
if (dbglevel > clicon_debug_get()) /* compare debug level with global variable */
|
||||
/* Mask debug level with global dbg variable */
|
||||
if ((dbglevel & clicon_debug_get()) == 0)
|
||||
return 0;
|
||||
/* Print xml as cbuf */
|
||||
if ((cb = cbuf_new()) == NULL){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue