debug.h: introduce DEBUG_STARTUP_NOTICE
authorBjörn Jacke <bj@sernet.de>
Mon, 18 Sep 2023 11:48:06 +0000 (13:48 +0200)
committerJule Anger <janger@samba.org>
Tue, 19 Dec 2023 09:43:09 +0000 (09:43 +0000)
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 <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit ccfe345fece0a5a44d766fb9426d43c2e046d040)

lib/util/debug.h

index 335a644718f55b8bdac9ad71dce66b3e1f7ae733..5433a585ec89b0f0c7105ccf395d2916858a1881 100644 (file)
@@ -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__))