Do not require logging support for BT_[CTF_]ASSERT_PRE()
This patch makes the BT_ASSERT_PRE(), BT_ASSERT_PRE_MSG(),
BT_CTF_ASSERT_PRE(), and BT_CTF_ASSERT_PRE_MSG() not use BT_LIB_LOGF()
and BT_LOGF() directly to not rely on the active log level to print the
messages.
This makes it possible to configure the build with
`BABELTRACE_DEV_MODE=1` and `BABELTRACE_MINIMAL_LOG_LEVEL=NONE` and
still get the precondition failure messages. This removes some code
in `configure.ac` and `src/lib/logging.c` which ensured that the log
level could not be NONE when developer mode is enabled.
The macros now use _bt_log_write_d() (which does not check the active
log level) and bt_lib_log() (which uses _bt_log_write_d() without
checking the active log level) instead of BT_LOGF() and BT_LIB_LOGF().
The `assert-pre.h` header still require that you include
`"lib/logging.h"` or `"logging/log.h"` before because this is where the
logging tag and logging functions are found.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: If98a1c074d211cf257742d55960b379bbe9c6cf0
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1546
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.025129 seconds and 4 git commands to generate.