2 #include <ccan/tap/tap.h>
8 bool suppress_logging = false;
9 const char *log_prefix = "";
11 /* Turn log messages into tap diag messages. */
12 static void taplog(struct tdb_context *tdb,
13 enum tdb_debug_level level,
23 vsprintf(line, fmt, ap);
26 /* Strip trailing \n: diag adds it. */
27 if (line[0] && line[strlen(line)-1] == '\n')
28 diag("%s%.*s", log_prefix, strlen(line)-1, line);
30 diag("%s%s", log_prefix, line);
33 struct tdb_logging_context taplogctx = { taplog, NULL };