DEBUG_DEBUG = 4,
};
+typedef void ctdb_ringbuf_log_fn(const char *format, ...);
+extern ctdb_ringbuf_log_fn *ctdb_ringbuf_log;
+
#define DEBUGLVL(lvl) ((lvl) <= LogLevel)
-#define DEBUG(lvl, x) do { this_log_level = (lvl); if ((lvl) < DEBUG_DEBUG) { log_ringbuffer x; } if ((lvl) <= LogLevel) { do_debug x; }} while (0)
+#define DEBUG(lvl, x) do { this_log_level = (lvl); if (ctdb_ringbuf_log && (lvl) < DEBUG_DEBUG) { ctdb_ringbuf_log x; } if ((lvl) <= LogLevel) { do_debug x; }} while (0)
#define DEBUGADD(lvl, x) do { if ((lvl) <= LogLevel) { this_log_level = (lvl); do_debug_add x; }} while (0)
#define _PUBLIC_