aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/cli.h
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2021-02-17 10:25:18 -0500
committerFlorin Coras <florin.coras@gmail.com>2021-02-18 15:42:03 +0000
commit3d0e0d155de32eb215a7ca675dfca5a28f8837cc (patch)
tree9e3292061613203a4e21a955f90951ad689dab1e /src/vlib/cli.h
parent8fb22fdade3633f1116c44b913934fcffe0d861b (diff)
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
Diffstat (limited to 'src/vlib/cli.h')
-rw-r--r--src/vlib/cli.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vlib/cli.h b/src/vlib/cli.h
index 0a8ef9d78d7..c31236f8ab9 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 @@ typedef struct vlib_cli_main_t
(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