summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2009-12-04 11:45:37 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2009-12-04 11:45:37 +1100
commite28c652ccabad2a3df6f60d95bcd4f32a3feaba8 (patch)
tree404c2f75d9e7281d52e2f05fd9a66d030042e1f1
parent8f442f1c0c9c5269d300ad5c574957664919904f (diff)
Dont store debug level DEBUG_DEBUG in the in-memory ringbuffer.
It is unlikely we will need something this verbose for normal troubleshooting. This allows us to keep a significantly longer time interval of log messages in the 500k slots available in the ringbuffer. (This used to be ctdb commit cc99c05c0c6484ad574039a454e6133852cb41fa)
-rw-r--r--ctdb/include/includes.h2
-rw-r--r--ctdb/lib/util/debug.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/include/includes.h b/ctdb/include/includes.h
index 4b4d2428ef..b7e2105dd6 100644
--- a/ctdb/include/includes.h
+++ b/ctdb/include/includes.h
@@ -28,7 +28,7 @@ enum debug_level {
DEBUG_DEBUG = 4,
};
-#define DEBUG(lvl, x) do { this_log_level = (lvl); log_ringbuffer x; if ((lvl) <= LogLevel) { do_debug x; }} while (0)
+#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 _PUBLIC_
diff --git a/ctdb/lib/util/debug.c b/ctdb/lib/util/debug.c
index 6597570348..d4d3bd643e 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 { this_log_level = (lvl); log_ringbuffer x; if ((lvl) <= LogLevel) { do_debug x; }} while (0)
+#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 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)