src/cpp-common: add `LogCfg` class
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 22 Apr 2022 20:47:55 +0000 (16:47 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 11 Sep 2023 15:24:02 +0000 (11:24 -0400)
commitf6368b95b8e549695f3ee1b953cc2e7b094736eb
treee7ff1957605a93eccd84f7aee0b0d7b5afe0b7f9
parentb9ebcd13e15c83e69afc0e132a1d78bc5544abf4
src/cpp-common: add `LogCfg` class

`LogCfg` is a class to carry around the logging information used by
`BT_LOG*()` macros in the in-tree plugins.

Philippe added:

* Class comment.

* Setting other members when possible (for example, `_mSelfComp` when
  using the self message iterator constructor).

* Use references instead of pointers in constructors because they can't
  be `nullptr`, making it possible to remove some assertions.

* Component class member (because the libbabeltrace2 API has nothing
  to get a self component class from a self component) and
  compClsName() method.

  compClsName() is always available when using the self message
  iterator, component, or component class constructor.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ic6980a2bcf74f8b270b0a108efc79f25f0e65d8d
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7936
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10808
Tested-by: jenkins <jenkins@lttng.org>
src/cpp-common/Makefile.am
src/cpp-common/log-cfg.hpp [new file with mode: 0644]
This page took 0.024785 seconds and 4 git commands to generate.