Change-Id: I5298a6af1a6e5a8127d20f546746d5050d767f06
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12245
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
#include "cpp-common/bt2/self-message-iterator.hpp"
#include "cpp-common/bt2s/optional.hpp"
#include "cpp-common/vendor/fmt/core.h"
#include "cpp-common/bt2/self-message-iterator.hpp"
#include "cpp-common/bt2s/optional.hpp"
#include "cpp-common/vendor/fmt/core.h"
+#include "cpp-common/vendor/wise-enum/wise_enum.h"
#include "logging/log-api.h"
namespace bt2c {
#include "logging/log-api.h"
namespace bt2c {
class Logger final
{
public:
class Logger final
{
public:
+ /* clang-format off */
+
/* Available log levels */
/* Available log levels */
- enum class Level
- {
- Trace = BT_LOG_TRACE,
- Debug = BT_LOG_DEBUG,
- Info = BT_LOG_INFO,
- Warning = BT_LOG_WARNING,
- Error = BT_LOG_ERROR,
- Fatal = BT_LOG_FATAL,
- None = BT_LOG_NONE,
- };
+ WISE_ENUM_CLASS_MEMBER(Level,
+ (Trace, BT_LOG_TRACE),
+ (Debug, BT_LOG_DEBUG),
+ (Info, BT_LOG_INFO),
+ (Warning, BT_LOG_WARNING),
+ (Error, BT_LOG_ERROR),
+ (Fatal, BT_LOG_FATAL),
+ (None, BT_LOG_NONE));
+
+ /* clang-format on */
/*
* Builds a logger from the self component class `selfCompCls` using
/*
* Builds a logger from the self component class `selfCompCls` using