summaryrefslogtreecommitdiff
path: root/ctdb/include
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-08-19 12:15:31 +1000
committerVolker Lendecke <vl@samba.org>2014-10-06 12:34:33 +0200
commitb4589b954e1090a934fafd3f8e3c2cf1ed785c61 (patch)
tree19b9ccceed2d3651584d65a45ec0d09a5ea87d7c /ctdb/include
parent3105737c4b38b3cb4f9408cfc82cf8b49bc3fb2e (diff)
downloadsamba-b4589b954e1090a934fafd3f8e3c2cf1ed785c61.tar.gz
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>
Diffstat (limited to 'ctdb/include')
-rw-r--r--ctdb/include/ctdb_logging.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/ctdb/include/ctdb_logging.h b/ctdb/include/ctdb_logging.h
index f6f904aeade..c0c02660051 100644
--- a/ctdb/include/ctdb_logging.h
+++ b/ctdb/include/ctdb_logging.h
@@ -20,8 +20,6 @@
#ifndef _CTDB_LOGGING_H_
#define _CTDB_LOGGING_H_
-extern int DEBUGLEVEL;
-extern int this_log_level;
extern const char *debug_extra;
enum debug_level {
@@ -35,8 +33,4 @@ enum debug_level {
DEBUG_DEBUG = 4,
};
-#define DEBUGLVL(lvl) ((lvl) <= DEBUGLEVEL)
-#define DEBUG(lvl, x) do { this_log_level = (lvl); if ((lvl) <= DEBUGLEVEL) { do_debug x; }} while (0)
-#define DEBUGADD(lvl, x) do { if ((lvl) <= DEBUGLEVEL) { this_log_level = (lvl); do_debug_add x; }} while (0)
-
#endif /* _CTDB_LOGGING_H_ */