lib: add internal BT_LIB_LOG*_APPEND_CAUSE() macros
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 21 Jun 2019 05:26:43 +0000 (01:26 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 6 Jul 2019 03:47:50 +0000 (23:47 -0400)
commit3cd4c495b8c065ababc249f66d460c4a707d415a
tree41631849fde8831749537f22c06c489971ab0c15
parentcee051052f3f3cd96a2eca5cbd9be7b4face0676
lib: add internal BT_LIB_LOG*_APPEND_CAUSE() macros

The new BT_LIB_LOGE_APPEND_CAUSE() and BT_LIB_LOGF_APPEND_CAUSE()
functions are like BT_LIB_LOGE() and BT_LIB_LOGF(), but they also call
bt_current_thread_error_append_cause_from_unknown() with the formatted
message to append a cause to the current thread's error object.

I plan to use them in lieu of BT_LIB_LOGE() and BT_LIB_LOGF() where
those are already used within the library to make support error
reporting from the library with minimal changes.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I6d7e3a5feac977f576c29c2451b5f0da8d42ae2b
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1617
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
CONTRIBUTING.adoc
src/lib/lib-logging.c
src/lib/logging.h
This page took 0.024458 seconds and 4 git commands to generate.