Cleanup: comp-logging.h: template `BT_COMP_OR_COMP_CLASS_LOG*` macros
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 8 Nov 2019 16:08:10 +0000 (11:08 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 15 Nov 2019 15:44:52 +0000 (10:44 -0500)
commit8eb59971bc7d2d813604009ceef37a7d68eca824
tree550d3617c8c9b607272f659216fdb455f0ed4f87
parent27c61ce8f6ee66d910507f8a40ae5497287c943e
Cleanup: comp-logging.h: template `BT_COMP_OR_COMP_CLASS_LOG*` macros

This commit is motivated by the need to have the
`BT_COMP_OR_COMP_CLASS_LOGW_ERRNO()` logging macro in a future commit.

It adds the following template macros to simplify add logging macros for
other logging levels:
  BT_COMP_OR_COMP_CLASS_LOG
  BT_COMP_OR_COMP_CLASS_LOG_ERRNO

I didn't add the `BT_COMP_OR_COMP_CLASS_LOG_APPEND_CAUSE` template as
it's less likely that we will need it for logging levels other than
`BT_LOG_ERROR`.

Also, to be uniform across the file, I moved all the `_lvl` parameter to
the first position for all macros in this file.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Ifbce021eecc08f8fc994a8ac0f4174ae3e1df853
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2354
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
src/logging/comp-logging.h
This page took 0.025846 seconds and 4 git commands to generate.