diff --git a/src/util/virprobe.h b/src/util/virprobe.h index 1baec98f786f4d2bfa8e32a2122f1ee1ae5ad403..88cda2104f08be285f7ae678bca056830de026ea 100644 --- a/src/util/virprobe.h +++ b/src/util/virprobe.h @@ -90,11 +90,19 @@ PROBE_EXPAND(LIBVIRT_ ## NAME, \ VIR_ADD_CASTS(__VA_ARGS__)); \ } + +# define PROBE_QUIET(NAME, FMT, ...) \ + if (LIBVIRT_ ## NAME ## _ENABLED()) { \ + PROBE_EXPAND(LIBVIRT_ ## NAME, \ + VIR_ADD_CASTS(__VA_ARGS__)); \ + } # else # define PROBE(NAME, FMT, ...) \ VIR_INFO_INT(&virLogSelf, \ __FILE__, __LINE__, __func__, \ #NAME ": " FMT, __VA_ARGS__); + +# define PROBE_QUIET(NAME, FMT, ...) # endif #endif /* __VIR_PROBE_H__ */