summaryrefslogtreecommitdiff
path: root/src/internal.h
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-09-27 14:28:44 +0100
committerDaniel P. Berrange <berrange@redhat.com>2012-09-28 10:34:14 +0100
commit0225c566f4d58dac9cd1071c97c495c5beaf653e (patch)
treee3f69a874902575002e4016fa41ca55304936140 /src/internal.h
parent96a1be95efd850cb8d049a96e30789e64b173278 (diff)
downloadlibvirt-0225c566f4d58dac9cd1071c97c495c5beaf653e.tar.gz
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>
Diffstat (limited to 'src/internal.h')
-rw-r--r--src/internal.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/internal.h b/src/internal.h
index 8037a4ae84..3545404acd 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -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