vlib: add a "vpplog" debug CLI
To add arbitrary text to the vlib log. Combines nicely with
comment/uncomment and the macro expander:
define MY_FEATURE uncomment # or comment
...
$(MY_FEATURE) { vpplog { My feature was enabled } }
Type: improvement
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ia019f0a8fa670d8593ae01595f5ef410796e5b1c
diff --git a/src/vlib/cli.h b/src/vlib/cli.h
index 0a8ef9d..c31236f 100644
--- a/src/vlib/cli.h
+++ b/src/vlib/cli.h
@@ -41,6 +41,7 @@
#define included_vlib_cli_h
#include <vppinfra/format.h>
+#include <vlib/log.h>
struct vlib_cli_command_t;
@@ -152,6 +153,10 @@
(struct vlib_cli_main_t *, u32 id, int before_or_after);
void (**perf_counter_cbs_tmp)
(struct vlib_cli_main_t *, u32 id, int before_or_after);
+
+ /* cli log */
+ vlib_log_class_t log;
+
} vlib_cli_main_t;
#ifndef CLIB_MARCH_VARIANT