lib: add _msg parameters to _ERRNO logging macros
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 21 Oct 2019 19:56:42 +0000 (15:56 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 30 Oct 2019 19:14:53 +0000 (15:14 -0400)
The macros BT_COMP_LOGE_APPEND_CAUSE_ERRNO and
BT_COMP_CLASS_LOGE_APPEND_CAUSE_ERRNO are missing the `_msg` parameter
that other _ERRNO macros have.  It still works, because the following
parameters are passed through the variable arguments, but it makes the
macro unnecessarily complicated to use.

Change-Id: Iabb89a24da1641c67b9843c8337aec709c7b3e08
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2229
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
src/logging/comp-logging.h

index 934e8487526026afbc27e2cc2729a4cacbc13709..1edabc0052947fa93bb7887bef3b169d00a821aa 100644 (file)
  * Logs error and appends error cause from component context - the errno
  * edition.
  */
  * Logs error and appends error cause from component context - the errno
  * edition.
  */
-#define BT_COMP_LOGE_APPEND_CAUSE_ERRNO(_self_comp, _fmt, ...)                         \
-       BT_COMP_LOG_APPEND_CAUSE_ERRNO(_self_comp, BT_LOG_ERROR, _fmt, ##__VA_ARGS__)
+#define BT_COMP_LOGE_APPEND_CAUSE_ERRNO(_self_comp, _msg, _fmt, ...)                           \
+       BT_COMP_LOG_APPEND_CAUSE_ERRNO(_self_comp, BT_LOG_ERROR, _msg, _fmt, ##__VA_ARGS__)
 
 /* Logs and appends error cause from component class context. */
 #define BT_COMP_CLASS_LOG_APPEND_CAUSE(_self_comp_class, _lvl, _fmt, ...)              \
 
 /* Logs and appends error cause from component class context. */
 #define BT_COMP_CLASS_LOG_APPEND_CAUSE(_self_comp_class, _lvl, _fmt, ...)              \
  * Logs error and appends error cause from component class context - the errno
  * edition.
  */
  * Logs error and appends error cause from component class context - the errno
  * edition.
  */
-#define BT_COMP_CLASS_LOGE_APPEND_CAUSE_ERRNO(_self_comp_class, _fmt, ...)             \
-       BT_COMP_CLASS_LOG_APPEND_CAUSE_ERRNO(_self_comp_class, BT_LOG_ERROR, _fmt,      \
+#define BT_COMP_CLASS_LOGE_APPEND_CAUSE_ERRNO(_self_comp_class, _msg, _fmt, ...)               \
+       BT_COMP_CLASS_LOG_APPEND_CAUSE_ERRNO(_self_comp_class, BT_LOG_ERROR, _msg, _fmt,        \
                ##__VA_ARGS__)
 
 /*
                ##__VA_ARGS__)
 
 /*
This page took 0.02448 seconds and 4 git commands to generate.