summaryrefslogtreecommitdiff
path: root/lib/tdb2/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tdb2/test')
-rw-r--r--lib/tdb2/test/logging.c4
-rw-r--r--lib/tdb2/test/logging.h1
-rw-r--r--lib/tdb2/test/run-seed.c1
3 files changed, 5 insertions, 1 deletions
diff --git a/lib/tdb2/test/logging.c b/lib/tdb2/test/logging.c
index f2e675e922..6927592b8a 100644
--- a/lib/tdb2/test/logging.c
+++ b/lib/tdb2/test/logging.c
@@ -15,12 +15,14 @@ union tdb_attribute tap_log_attr = {
void tap_log_fn(struct tdb_context *tdb,
enum tdb_log_level level,
+ enum TDB_ERROR ecode,
const char *message, void *priv)
{
if (suppress_logging)
return;
- diag("tdb log level %u: %s%s", level, log_prefix, message);
+ diag("tdb log level %u: %s: %s%s",
+ level, tdb_errorstr(ecode), log_prefix, message);
if (log_last)
free(log_last);
log_last = strdup(message);
diff --git a/lib/tdb2/test/logging.h b/lib/tdb2/test/logging.h
index 0fd59ba6bb..2dfea145c3 100644
--- a/lib/tdb2/test/logging.h
+++ b/lib/tdb2/test/logging.h
@@ -12,5 +12,6 @@ extern char *log_last;
void tap_log_fn(struct tdb_context *tdb,
enum tdb_log_level level,
+ enum TDB_ERROR ecode,
const char *message, void *priv);
#endif /* TDB2_TEST_LOGGING_H */
diff --git a/lib/tdb2/test/run-seed.c b/lib/tdb2/test/run-seed.c
index a9b370b6e5..e1c23a0c57 100644
--- a/lib/tdb2/test/run-seed.c
+++ b/lib/tdb2/test/run-seed.c
@@ -14,6 +14,7 @@ static int log_count = 0;
/* Normally we get a log when setting random seed. */
static void my_log_fn(struct tdb_context *tdb,
enum tdb_log_level level,
+ enum TDB_ERROR ecode,
const char *message, void *priv)
{
log_count++;