mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
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:
1 parent
ca747a5dca
commit
f5ce82ba17
1 file changed
+14
@@ -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
|
||||
Reference in new issue
Block a user