From f4fc9a153c533968905b8c7945c6615dcd9253d1 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Wed, 8 Oct 2014 14:22:53 +1100 Subject: ctdb-logging: Remove debug levels DEBUG_ALERT and DEBUG_CRIT Internally map them to DEBUG_ERR to limit code churn. This reduces the unwieldy number of debug levels used by CTDB. ALERT and CRIT aren't of much use as separate errors, since everything from ERR up should always be logged. In future just ERR can be used. This also improves compatibility with Samba's debug.c system priority mapping. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/include/ctdb_logging.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ctdb/include') diff --git a/ctdb/include/ctdb_logging.h b/ctdb/include/ctdb_logging.h index 1fd61239913..6faf3d947bb 100644 --- a/ctdb/include/ctdb_logging.h +++ b/ctdb/include/ctdb_logging.h @@ -23,8 +23,6 @@ extern const char *debug_extra; enum debug_level { - DEBUG_ALERT = -2, - DEBUG_CRIT = -1, DEBUG_ERR = 0, DEBUG_WARNING = 1, DEBUG_NOTICE = 2, @@ -32,4 +30,8 @@ enum debug_level { DEBUG_DEBUG = 4, }; +/* These are used in many places, so define them here to avoid churn */ +#define DEBUG_ALERT DEBUG_ERR +#define DEBUG_CRIT DEBUG_ERR + #endif /* _CTDB_LOGGING_H_ */ -- cgit v1.2.1