ctdb-logging: Update to use Samba style debug.h/debug.c
authorMartin Schwenke <martin@meltin.net>
Tue, 19 Aug 2014 02:15:31 +0000 (12:15 +1000)
committerVolker Lendecke <vl@samba.org>
Mon, 6 Oct 2014 10:34:33 +0000 (12:34 +0200)
commitb4589b954e1090a934fafd3f8e3c2cf1ed785c61
tree19b9ccceed2d3651584d65a45ec0d09a5ea87d7c
parent3105737c4b38b3cb4f9408cfc82cf8b49bc3fb2e
ctdb-logging: Update to use Samba style debug.h/debug.c

Samba's debug subsystem has changed a lot, so CTDB's logging needs
to be rewritten to be compatible.

The new debug.h/debug.c can't just be pulled in because it has some
extra dependencies into Samba's lib/util.  For now, to support the
smallest possible patch, implement a minimal subset of Samba's
debug.[ch] that just supports the DEBUG_CALLBACK logtype.

Define a callback for each logging method.

Check later to see if debug_extra (or similar) can somehow be
implemented using debug classes.

The timestamp on CTDB CLI tool and test program DEBUG() output goes
away, so update the unit test code to cope.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
ctdb/common/ctdb_logging.c
ctdb/include/ctdb_logging.h
ctdb/lib/tdb_wrap/tdb_wrap.c
ctdb/lib/util/debug.c
ctdb/lib/util/debug.h
ctdb/server/ctdb_logging.c