util: probe: Add 'PROBE_DEBUG'

The standard 'PROBE' macro uses the 'info' priority for the log entry
corresponding to the probe point. While in some cases it makes sense to
log above debug priority in others it does not. Add the possibility to
pick a lower priority level.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa committed 2026-05-19 09:42:35 +02:00
1 parent ca747a5dca
commit f5ce82ba17
1 file changed
+14
+14
View File
@@ -90,6 +90,15 @@
VIR_ADD_CASTS(__VA_ARGS__)); \
}
# define PROBE_DEBUG(NAME, FMT, ...) \
VIR_DEBUG_INT(&virLogSelf, \
__FILE__, __LINE__, __func__, \
#NAME ": " FMT, __VA_ARGS__); \
if (LIBVIRT_ ## NAME ## _ENABLED()) { \
PROBE_EXPAND(LIBVIRT_ ## NAME, \
VIR_ADD_CASTS(__VA_ARGS__)); \
}
# define PROBE_QUIET(NAME, FMT, ...) \
if (LIBVIRT_ ## NAME ## _ENABLED()) { \
PROBE_EXPAND(LIBVIRT_ ## NAME, \
@@ -101,5 +110,10 @@
__FILE__, __LINE__, __func__, \
#NAME ": " FMT, __VA_ARGS__);
# define PROBE_DEBUG(NAME, FMT, ...) \
VIR_DEBUG_INT(&virLogSelf, \
__FILE__, __LINE__, __func__, \
#NAME ": " FMT, __VA_ARGS__); \
# define PROBE_QUIET(NAME, FMT, ...)
#endif