Make it possible to build a `Logger` from a self component class only
(for instance, from the "get supported mip versions" method).
Change-Id: Ic1d0abe8832eb5af831d5fa2b66b3d9737bcdee7
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/13294
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
/* clang-format on */
+ /*
+ * Builds a logger from the self component class `selfCompCls` using
+ * the tag `tag` and the logging level `logLevel`.
+ */
+ explicit Logger(const bt2::SelfComponentClass selfCompCls, const bt2::LoggingLevel logLevel,
+ std::string tag) noexcept :
+ _mSelfCompCls {selfCompCls},
+ _mLevel {static_cast<Level>(logLevel)}, _mTag {std::move(tag)}
+ {
+ }
+
/*
* Builds a logger from the self component class `selfCompCls` using
* the tag `tag` and the logging level of `privQueryExec`.