On 09/27/2012 10:44 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The 'const char *category' parameter only has a few possible
values now that the filename has been separated. Turn this
parameter into an enum instead.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/internal.h | 6 +++--
src/node_device/node_device_udev.c | 2 +-
src/uml/uml_conf.c | 3 ---
src/util/logging.c | 49 ++++++++++++++++++---------------
src/util/logging.h | 55 ++++++++++++++++++++++----------------
src/util/viraudit.c | 9 ++++---
src/util/viraudit.h | 6 ++---
src/util/virterror.c | 5 ++--
tests/testutils.c | 2 +-
9 files changed, 76 insertions(+), 61 deletions(-)
diff --git a/src/internal.h b/src/internal.h
index a1d46b9..2d378fd 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -349,7 +349,8 @@
# define PROBE_EXPAND(NAME, ARGS) NAME(ARGS)
# define PROBE(NAME, FMT, ...) \
- VIR_DEBUG_INT("trace", __FILE__ , __LINE__, __func__, \
+ VIR_DEBUG_INT(VIR_LOG_FROM_TRACE, \
+ __FILE__ , __LINE__, __func__, \
#NAME ": " FMT, __VA_ARGS__); \
if (LIBVIRT_ ## NAME ## _ENABLED()) { \
PROBE_EXPAND(LIBVIRT_ ## NAME, \
@@ -357,7 +358,8 @@
}
# else
# define PROBE(NAME, FMT, ...) \
- VIR_DEBUG_INT("trace", __FILE__, __LINE__, __func__, \
+ VIR_DEBUG_INT(VIR_LOG_FROM_TRACE, \
+ __FILE__ , __LINE__, __func__, \
Funky alignment of \ (depending on how you resolve my comments on 5/9,
you may already have fixed this while resolving minor merge conflicts).
@@ -879,9 +885,8 @@ virLogStackTraceToFd(int fd)
#undef STRIP_DEPTH
}
-
static void
-virLogOutputToFd(const char *category ATTRIBUTE_UNUSED,
Spurious whitespace change.
ACK with that fixed.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org