diff options
author | Neale Ranns <nranns@cisco.com> | 2018-09-24 12:36:26 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-10-16 12:22:49 +0000 |
commit | 710071bf0ed7a0926581d1f738a142b72e795d2b (patch) | |
tree | 6e3b8e7bc07b3e48ed4041ffe657ba1e4da058f1 /src/vnet/dpo/load_balance_map.c | |
parent | a5ab5034f4b50fc5a19ccf8910c91613e6a52f5a (diff) |
FIB: use vlib-log for debugging
Change-Id: I9052202b8cbcf656e61d635253d515f0f3a8d145
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/dpo/load_balance_map.c')
-rw-r--r-- | src/vnet/dpo/load_balance_map.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/vnet/dpo/load_balance_map.c b/src/vnet/dpo/load_balance_map.c index 588c1a75a4f..8f9bd366c4a 100644 --- a/src/vnet/dpo/load_balance_map.c +++ b/src/vnet/dpo/load_balance_map.c @@ -68,18 +68,20 @@ typedef struct load_balance_map_path_t_ { */ load_balance_map_t *load_balance_map_pool; +/** + * the logger + */ +vlib_log_class_t load_balance_map_logger; + /* * Debug macro */ -#ifdef FIB_DEBUG -#define LOAD_BALANCE_MAP_DBG(_pl, _fmt, _args...) \ - { \ - clib_warning("lbm: FIXME" _fmt, \ - ##_args); \ - } -#else -#define LOAD_BALANCE_MAP_DBG(_pl, _fmt, _args...) -#endif +#define LOAD_BALANCE_MAP_DBG(_pl, _fmt, _args...) \ +{ \ + vlib_log_debug(load_balance_map_logger, \ + "lbm:" _fmt, \ + ##_args); \ +} static index_t load_balance_map_get_index (load_balance_map_t *lbm) @@ -412,6 +414,9 @@ load_balance_map_init (load_balance_map_t *lbm, load_balance_map_fill(lbm); + load_balance_map_logger = + vlib_log_register_class ("dpo", "load-balance-map"); + return (lbm); } |