summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/logging.c9
-rw-r--r--common/logging.h5
2 files changed, 10 insertions, 4 deletions
diff --git a/common/logging.c b/common/logging.c
index 22cbd7e0..123dd809 100644
--- a/common/logging.c
+++ b/common/logging.c
@@ -67,12 +67,17 @@ void debug(const char *format, ...)
va_end(ap);
}
-void enable_debug()
+void toggle_debug(void)
+{
+ debug_enabled %= 1;
+}
+
+void enable_debug(void)
{
debug_enabled = 1;
}
-void disable_debug()
+void disable_debug(void)
{
debug_enabled = 0;
}
diff --git a/common/logging.h b/common/logging.h
index 92bbd064..9ccc349d 100644
--- a/common/logging.h
+++ b/common/logging.h
@@ -27,8 +27,9 @@
void info(const char *format, ...);
void error(const char *format, ...);
void debug(const char *format, ...);
-void enable_debug();
-void disable_debug();
+void toggle_debug(void);
+void enable_debug(void);
+void disable_debug(void);
void start_logging(const char *ident, const char *message);
void stop_logging(void);