aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/dpo/replicate_dpo.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-09-24 12:36:26 +0000
committerDamjan Marion <dmarion@me.com>2018-10-16 12:22:49 +0000
commit710071bf0ed7a0926581d1f738a142b72e795d2b (patch)
tree6e3b8e7bc07b3e48ed4041ffe657ba1e4da058f1 /src/vnet/dpo/replicate_dpo.c
parenta5ab5034f4b50fc5a19ccf8910c91613e6a52f5a (diff)
FIB: use vlib-log for debugging
Change-Id: I9052202b8cbcf656e61d635253d515f0f3a8d145 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/dpo/replicate_dpo.c')
-rw-r--r--src/vnet/dpo/replicate_dpo.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/vnet/dpo/replicate_dpo.c b/src/vnet/dpo/replicate_dpo.c
index 6742bff41aa..443df66e238 100644
--- a/src/vnet/dpo/replicate_dpo.c
+++ b/src/vnet/dpo/replicate_dpo.c
@@ -19,21 +19,20 @@
#include <vnet/adj/adj.h>
#include <vnet/mpls/mpls_types.h>
-#undef REP_DEBUG
+/**
+ * the logger
+ */
+vlib_log_class_t replicate_logger;
-#ifdef REP_DEBUG
#define REP_DBG(_rep, _fmt, _args...) \
{ \
- u8* _tmp =NULL; \
- clib_warning("rep:[%s]:" _fmt, \
- replicate_format(replicate_get_index((_rep)), \
- 0, _tmp), \
- ##_args); \
- vec_free(_tmp); \
+ vlib_log_debug(replicate_logger, \
+ "rep:[%U]:" _fmt, \
+ format_replicate, \
+ replicate_get_index(_rep), \
+ REPLICATE_FORMAT_NONE, \
+ ##_args); \
}
-#else
-#define REP_DBG(_p, _fmt, _args...)
-#endif
#define foreach_replicate_dpo_error \
_(BUFFER_ALLOCATION_FAILURE, "Buffer Allocation Failure")
@@ -580,6 +579,7 @@ void
replicate_module_init (void)
{
dpo_register(DPO_REPLICATE, &rep_vft, replicate_nodes);
+ replicate_logger = vlib_log_register_class("dpo", "replicate");
}
static clib_error_t *