status: add multiple levels of logging.

status_trace maps to status_debug.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-02-05 14:39:27 +10:30
parent f66c8306f4
commit 84bf60f934
17 changed files with 194 additions and 86 deletions

View File

@@ -4,6 +4,7 @@
#include <ccan/tal/tal.h>
#include <ccan/time/time.h>
#include <ccan/typesafe_cb/typesafe_cb.h>
#include <common/status.h>
#include <common/type_to_string.h>
#include <stdarg.h>
@@ -11,19 +12,6 @@ struct lightningd;
struct timerel;
struct lightningd;
enum log_level {
/* Logging all IO. */
LOG_IO,
/* Gory details which are mainly good for debugging. */
LOG_DBG,
/* Information about what's going in. */
LOG_INFORM,
/* That's strange... */
LOG_UNUSUAL,
/* That's really bad, we're broken. */
LOG_BROKEN
};
/* We can have a single log book, with multiple logs in it. */
struct log_book *new_log_book(const tal_t *ctx,
size_t max_mem,