X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvcl%2Fvcl_debug.h;h=191d4004eba32fce5a06eed750c2c5ae4717618e;hb=e0982e56f0b644fbec429fa8639ddb1b3403bea8;hp=13e6726c259c1c534a38254038ef3a3acd22be75;hpb=0d427d8d8a48af404dfc6535ae72d334b790f809;p=vpp.git diff --git a/src/vcl/vcl_debug.h b/src/vcl/vcl_debug.h index 13e6726c259..191d4004eba 100644 --- a/src/vcl/vcl_debug.h +++ b/src/vcl/vcl_debug.h @@ -19,10 +19,23 @@ #include #define VCL_ELOG 0 +#define VCL_DBG_ON 1 #define VDBG(_lvl, _fmt, _args...) \ - if (vcm->debug > _lvl) \ - clib_warning (_fmt, ##_args) + if (VCL_DBG_ON && vcm->debug > _lvl) \ + clib_warning ("vcl<%d:%d>: " _fmt, \ + vcm->workers[__vcl_worker_index].current_pid, \ + __vcl_worker_index, ##_args) + +#define VWRN(_fmt, _args...) \ + clib_warning ("vcl<%d:%d>: " _fmt, \ + vcm->workers[__vcl_worker_index].current_pid, \ + __vcl_worker_index, ##_args) + +#define VERR(_fmt, _args...) \ + clib_warning ("vcl<%d:%d>: ERROR " _fmt, \ + vcm->workers[__vcl_worker_index].current_pid, \ + __vcl_worker_index, ##_args) #define foreach_vcl_dbg_evt \ _(INIT, "vcl init track") \