mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Include filename explicitly in logging APIs
Currently the logging APIs have a 'const char *category' parameter which indicates where the log message comes from. This is typically a combination of the __FILE__ string and other prefix. Split the __FILE__ off into a dedicated parameter so it can passed to the log outputs Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@@ -349,15 +349,15 @@
|
||||
|
||||
# define PROBE_EXPAND(NAME, ARGS) NAME(ARGS)
|
||||
# define PROBE(NAME, FMT, ...) \
|
||||
VIR_DEBUG_INT("trace." __FILE__ , __func__, __LINE__, \
|
||||
VIR_DEBUG_INT("trace", __FILE__, __LINE__, __func__, \
|
||||
#NAME ": " FMT, __VA_ARGS__); \
|
||||
if (LIBVIRT_ ## NAME ## _ENABLED()) { \
|
||||
PROBE_EXPAND(LIBVIRT_ ## NAME, \
|
||||
if (LIBVIRT_ ## NAME ## _ENABLED()) { \
|
||||
PROBE_EXPAND(LIBVIRT_ ## NAME, \
|
||||
VIR_ADD_CASTS(__VA_ARGS__)); \
|
||||
}
|
||||
# else
|
||||
# define PROBE(NAME, FMT, ...) \
|
||||
VIR_DEBUG_INT("trace." __FILE__, __func__, __LINE__, \
|
||||
VIR_DEBUG_INT("trace", __FILE__, __LINE__, __func__, \
|
||||
#NAME ": " FMT, __VA_ARGS__);
|
||||
# endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user