summaryrefslogtreecommitdiffstats
path: root/ctdb/lib/util/debug.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2009-11-18 12:44:18 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2009-11-18 12:44:18 +1100
commitbc2675119df5c2fe0943bcfea0178a1926be6fc7 (patch)
tree968753be6eade458bf87405e5b1aead192eea312 /ctdb/lib/util/debug.c
parent24c593d21f24c79f1a7b24aa1d1642b41e3f4efa (diff)
add an in memory ringbuffer where we store the last 500000 log entries regardless of log level.
add commandt to extract this in memory buffer and to clear it (This used to be ctdb commit 29d2ee8d9c6c6f36b2334480f646d6db209f370e)
Diffstat (limited to 'ctdb/lib/util/debug.c')
-rw-r--r--ctdb/lib/util/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/lib/util/debug.c b/ctdb/lib/util/debug.c
index 63ca03b5a7..6597570348 100644
--- a/ctdb/lib/util/debug.c
+++ b/ctdb/lib/util/debug.c
@@ -90,7 +90,7 @@ void do_debug_add(const char *format, ...)
}
#define DEBUGLVL(lvl) ((lvl) <= LogLevel)
-#define DEBUG(lvl, x) do { if ((lvl) <= LogLevel) { this_log_level = (lvl); do_debug x; }} while (0)
+#define DEBUG(lvl, x) do { this_log_level = (lvl); log_ringbuffer 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)
static void print_asc(int level, const uint8_t *buf, size_t len)