cpp-common/bt2c/logging.hpp: remove no-formatting ("str") alternatives
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 25 Apr 2024 04:05:09 +0000 (00:05 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 25 Apr 2024 13:21:01 +0000 (09:21 -0400)
commite27adb90396a8c985b7d27004f82c56ff9c31b3d
tree9f0a3617109e9096c12d1b938653431df81ed73f
parente40ac8f6684dbeb4b6a0715baa7b25667b53f1e6
cpp-common/bt2c/logging.hpp: remove no-formatting ("str") alternatives

This patch removes everything named bt2c::Logger::log*Str*() and
BT_CPPLOG*STR*().

The no-formatting versions existed to avoid a call to fmt::format_to()
when you need to log a literal string as is, without any formatting. It
was also useful to pass a user string as is.

However, in the end, I don't think such an optimization is necessary:

• We don't use the no-formatting versions that much compared to messages
  with a format string.

• fmt::format_to() is pretty fast without any replacement field.

• We're talking about logging performance.

• This patch removes a lot of often redudant code from `logging.hpp`.

Adapt the current no-formatting logging calls accordingly.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ie02ea492e220c7ce9b72aaf8728fb7d2211e0bc0
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12479
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
17 files changed:
src/cpp-common/bt2c/logging.hpp
src/plugins/ctf/common/src/bfcr/bfcr.cpp
src/plugins/ctf/common/src/metadata/tsdl/ctf-meta-resolve.cpp
src/plugins/ctf/common/src/metadata/tsdl/decoder-packetized-file-stream-to-buf.cpp
src/plugins/ctf/common/src/metadata/tsdl/lexer.lpp
src/plugins/ctf/common/src/metadata/tsdl/objstack.cpp
src/plugins/ctf/common/src/metadata/tsdl/parser.ypp
src/plugins/ctf/common/src/metadata/tsdl/visitor-generate-ir.cpp
src/plugins/ctf/common/src/msg-iter/msg-iter.cpp
src/plugins/ctf/fs-sink/fs-sink-trace.cpp
src/plugins/ctf/fs-sink/fs-sink.cpp
src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.cpp
src/plugins/ctf/fs-src/data-stream-file.cpp
src/plugins/ctf/fs-src/fs.cpp
src/plugins/ctf/lttng-live/lttng-live.cpp
src/plugins/utils/muxer/comp.cpp
src/plugins/utils/muxer/msg-iter.cpp
This page took 0.026584 seconds and 4 git commands to generate.