From: Björn Jacke Date: Mon, 18 Sep 2023 11:48:06 +0000 (+0200) Subject: debug.h: introduce DEBUG_STARTUP_NOTICE X-Git-Tag: talloc-2.4.2~637 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccfe345fece0a5a44d766fb9426d43c2e046d040;p=thirdparty%2Fsamba.git debug.h: introduce DEBUG_STARTUP_NOTICE this is log level -1 and lowest syslog priority. This is used for start up messages and copyright notices, which should always be printed but which are no errors or warnings. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15377 Signed-off-by: Bjoern Jacke Reviewed-by: Andrew Bartlett --- diff --git a/lib/util/debug.h b/lib/util/debug.h index dc86fa8acee..90230a2d88f 100644 --- a/lib/util/debug.h +++ b/lib/util/debug.h @@ -269,12 +269,14 @@ void debuglevel_set_class(size_t idx, int level); /* * Debug levels matching RFC 3164 */ +#define DBGLVL_STARTUP_NOTICE -1 /* startup notice */ #define DBGLVL_ERR 0 /* error conditions */ #define DBGLVL_WARNING 1 /* warning conditions */ #define DBGLVL_NOTICE 3 /* normal, but significant, condition */ #define DBGLVL_INFO 5 /* informational message */ #define DBGLVL_DEBUG 10 /* debug-level message */ +#define DBG_STARTUP_NOTICE(...) DBG_PREFIX(DBGLVL_STARTUP_NOTICE, (__VA_ARGS__)) #define DBG_ERR(...) DBG_PREFIX(DBGLVL_ERR, (__VA_ARGS__)) #define DBG_WARNING(...) DBG_PREFIX(DBGLVL_WARNING, (__VA_ARGS__)) #define DBG_NOTICE(...) DBG_PREFIX(DBGLVL_NOTICE, (__VA_ARGS__))