2 #include "tap-interface.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
, (unsigned)strlen(line
)-1, line
);
30 diag("%s%s", log_prefix
, line
);
33 struct tdb_logging_context taplogctx
= { taplog
, NULL
};