git.samba.org
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfdaa44
)
tdb: improve logging
author
Rusty Russell
<rusty@rustcorp.com.au>
Thu, 1 Jul 2010 08:33:18 +0000
(18:33 +1000)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Thu, 1 Jul 2010 08:33:18 +0000
(18:33 +1000)
When tdb throws an error, we didn't report the name of the tdb; we should.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/util/db_wrap.c
patch
|
blob
|
history
diff --git
a/lib/util/db_wrap.c
b/lib/util/db_wrap.c
index 7f5240e932891355ca2431b09ef40aa8130f4c8d..9c4f6dd4d7198c35e89f19030aa6eaebba2afeb5 100644
(file)
--- a/
lib/util/db_wrap.c
+++ b/
lib/util/db_wrap.c
@@
-48,9
+48,10
@@
static void log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const ch
{
if (level <= TDB_DEBUG_ERROR) {
va_list ap;
-
+ char newfmt[strlen(tdb_name(tdb)) + 1 + strlen(fmt) + 1];
+ sprintf(newfmt, "%s:%s", tdb_name(tdb), fmt);
va_start(ap, fmt);
- do_debug_v(fmt, ap);
+ do_debug_v(
new
fmt, ap);
va_end(ap);
}
}