lib/util: add debug_set_forced_log_priority()
authorStefan Metzmacher <metze@samba.org>
Wed, 22 Nov 2023 16:03:30 +0000 (17:03 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 24 Nov 2023 09:30:38 +0000 (09:30 +0000)
commitbd21a0cdefb30ef5522f81d865c03d11a182a63c
treeeac141f79aa74e2bb57fc804696d87b98a9c5f90
parent83e8971c0f1c1db8c3574f83107190ac1ac23db0
lib/util: add debug_set_forced_log_priority()

By default the priority for syslog/systemd is derived from
the log level of the debug message.

But for things like startup messages we want to
change the priority temporary, like this:

debug_set_forced_log_priority(DBGLVL_NOTICE);
D_ERR("Startup...\n");
debug_set_forced_log_priority(-1);

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15377

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/util/debug.c
lib/util/debug.h