# HG changeset patch # User john.levon@xxxxxxx # Date 1230005985 28800 # Node ID 60090fd4e447795742265241b39f2759d9530514 # Parent d7c3bd669a72371127852aefb3ba2cc0443da8da Fix non-debug compile Remove duplicate defines, and stub out virLogMessage() for non-debug builds. Signed-off-by: John Levon <john.levon@xxxxxxx> diff --git a/src/logging.h b/src/logging.h --- a/src/logging.h +++ b/src/logging.h @@ -47,12 +47,6 @@ do { } while (0) #define VIR_ERROR(category, f, l, fmt,...) \ do { } while (0) -#define VIR_INFO(category, fmt,...) \ - do { } while (0) -#define VIR_WARN(category, fmt,...) \ - do { } while (0) -#define VIR_ERROR(category, fmt,...) \ - do { } while (0) #endif /* !ENABLE_DEBUG */ #define DEBUG(fmt,...) \ @@ -82,6 +76,8 @@ typedef enum { VIR_LOG_WARN, VIR_LOG_ERROR, } virLogPriority; + +#ifdef ENABLE_DEBUG /** * virLogOutputFunc: @@ -114,10 +110,6 @@ extern int virLogDefineOutput(virLogOutp extern int virLogDefineOutput(virLogOutputFunc f, virLogCloseFunc c, void *data, int priority, int flags); -#if 0 -extern char *virLogGetDump(int flags); -#endif - /* * Internal logging API */ @@ -127,8 +119,23 @@ extern void virLogShutdown(void); extern void virLogShutdown(void); extern int virLogParseFilters(const char *filters); extern int virLogParseOutputs(const char *output); + extern void virLogMessage(const char *category, int priority, const char *funcname, long long linenr, int flags, const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 6, 7); +#else /* ENABLE_DEBUG */ + +#define virLogSetDefaultPriority(p) +#define virLogDefineFilter(m, p, f) +#define virLogDefineOutput(func, c, d, p, f) +#define virLogStartup() +#define virLogReset() +#define virLogShutdown() +#define virLogParseFilters(f) +#define virLogParseOutputs(o) +#define virLogMessage(c, p, func, l, f, fmt, __VA_ARGS__) + +#endif /* ENABLE_DEBUG */ + #endif -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list