summaryrefslogtreecommitdiff
path: root/ctdb/common
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2016-11-23 19:03:23 +1100
committerMartin Schwenke <martins@samba.org>2016-12-05 08:09:22 +0100
commitc54943f8bb1e5d23502cb594d1b16f253cddf722 (patch)
tree52fbdd8a11e674727ceb78234bd3e747fac28379 /ctdb/common
parent657f2c687c60af18ba32a7612da354109cb6e400 (diff)
downloadsamba-c54943f8bb1e5d23502cb594d1b16f253cddf722.tar.gz
ctdb-logging: Use Samba's debug levels
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/common')
-rw-r--r--ctdb/common/logging.c6
-rw-r--r--ctdb/common/logging.h12
2 files changed, 13 insertions, 5 deletions
diff --git a/ctdb/common/logging.c b/ctdb/common/logging.c
index 921cc236e61..4b0406c2256 100644
--- a/ctdb/common/logging.c
+++ b/ctdb/common/logging.c
@@ -28,8 +28,14 @@ struct {
} log_string_map[] = {
{ DEBUG_ERR, "ERROR" },
{ DEBUG_WARNING, "WARNING" },
+ { 2, "WARNING" },
{ DEBUG_NOTICE, "NOTICE" },
+ { 4, "NOTICE" },
{ DEBUG_INFO, "INFO" },
+ { 6, "INFO" },
+ { 7, "INFO" },
+ { 8, "INFO" },
+ { 9, "INFO" },
{ DEBUG_DEBUG, "DEBUG" },
};
diff --git a/ctdb/common/logging.h b/ctdb/common/logging.h
index 947edb54a9b..742675d076d 100644
--- a/ctdb/common/logging.h
+++ b/ctdb/common/logging.h
@@ -20,11 +20,13 @@
#ifndef __CTDB_LOGGING_H__
#define __CTDB_LOGGING_H__
-#define DEBUG_ERR 0
-#define DEBUG_WARNING 1
-#define DEBUG_NOTICE 2
-#define DEBUG_INFO 3
-#define DEBUG_DEBUG 4
+#include "lib/util/debug.h"
+
+#define DEBUG_ERR DBGLVL_ERR
+#define DEBUG_WARNING DBGLVL_WARNING
+#define DEBUG_NOTICE DBGLVL_NOTICE
+#define DEBUG_INFO DBGLVL_INFO
+#define DEBUG_DEBUG DBGLVL_DEBUG
/* These are used in many places, so define them here to avoid churn */
#define DEBUG_ALERT DEBUG_ERR