logger CHANGE rename ly_verb_dbg() to ly_log_dbg_groups()
Align the function with the ly_log_level() (recently renamed ly_verb())
and its purpose.
diff --git a/src/log.c b/src/log.c
index dd456d3..4ce8d1e 100644
--- a/src/log.c
+++ b/src/log.c
@@ -36,7 +36,7 @@
static ly_log_clb log_clb;
static volatile ly_bool path_flag = 1;
#ifndef NDEBUG
-volatile uint32_t ly_log_dbg_groups = 0;
+volatile uint32_t ly_ldbg_groups = 0;
#endif
/* how many bytes add when enlarging buffers */
@@ -211,10 +211,10 @@
}
API void
-ly_verb_dbg(uint32_t dbg_groups)
+ly_log_dbg_groups(uint32_t dbg_groups)
{
#ifndef NDEBUG
- ly_log_dbg_groups = dbg_groups;
+ ly_ldbg_groups = dbg_groups;
#else
(void)dbg_groups;
#endif
@@ -365,7 +365,7 @@
const char *str_group;
va_list ap;
- if (!(ly_log_dbg_groups & group)) {
+ if (!(ly_ldbg_groups & group)) {
return;
}
diff --git a/src/log.h b/src/log.h
index 1b95e0c..27e6fcd 100644
--- a/src/log.h
+++ b/src/log.h
@@ -111,7 +111,7 @@
* @brief Enable specific debugging messages (independent of log level).
* @param[in] dbg_groups Bitfield of enabled debug message groups (see @ref dbggroup).
*/
-void ly_verb_dbg(uint32_t dbg_groups);
+void ly_log_dbg_groups(uint32_t dbg_groups);
#endif
diff --git a/tools/lint/commands.c b/tools/lint/commands.c
index f487583..e4ac307 100644
--- a/tools/lint/commands.c
+++ b/tools/lint/commands.c
@@ -1399,22 +1399,22 @@
if (!strcmp(verb, "error") || !strcmp(verb, "0")) {
ly_log_level(LY_LLERR);
#ifndef NDEBUG
- ly_verb_dbg(0);
+ ly_log_dbg_groups(0);
#endif
} else if (!strcmp(verb, "warning") || !strcmp(verb, "1")) {
ly_log_level(LY_LLWRN);
#ifndef NDEBUG
- ly_verb_dbg(0);
+ ly_log_dbg_groups(0);
#endif
} else if (!strcmp(verb, "verbose") || !strcmp(verb, "2")) {
ly_log_level(LY_LLVRB);
#ifndef NDEBUG
- ly_verb_dbg(0);
+ ly_log_dbg_groups(0);
#endif
} else if (!strcmp(verb, "debug") || !strcmp(verb, "3")) {
ly_log_level(LY_LLDBG);
#ifndef NDEBUG
- ly_verb_dbg(LY_LDGDICT | LY_LDGYANG | LY_LDGYIN | LY_LDGXPATH | LY_LDGDIFF);
+ ly_log_dbg_groups(LY_LDGDICT | LY_LDGYANG | LY_LDGYIN | LY_LDGXPATH | LY_LDGDIFF);
#endif
} else {
fprintf(stderr, "Unknown verbosity \"%s\"\n", verb);
@@ -1460,7 +1460,7 @@
return 1;
}
}
- ly_verb_dbg(grps);
+ ly_log_dbg_groups(grps);
return 0;
}
diff --git a/tools/lint/main_ni.c b/tools/lint/main_ni.c
index 8a94ee0..96fab46 100644
--- a/tools/lint/main_ni.c
+++ b/tools/lint/main_ni.c
@@ -578,7 +578,7 @@
++ptr;
}
}
- ly_verb_dbg(u);
+ ly_log_dbg_groups(u);
break;
#endif
#if 0