X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Ferror.hpp;h=390c4dccc1ada97dbbe8e6b886791366eac0ddc1;hb=0038180de36c422cfaeade1145fa9fbc9436b8ad;hp=8b8e4364530bfcaccc7113697eaed0ff9d8a3bac;hpb=8b75cd779ffe332281fec189cdf808e4ee452572;p=lttng-tools.git diff --git a/src/common/error.hpp b/src/common/error.hpp index 8b8e43645..390c4dccc 100644 --- a/src/common/error.hpp +++ b/src/common/error.hpp @@ -9,14 +9,16 @@ #define _ERROR_H #include -#include +#include +#include +#include +#include + +#include #include +#include #include -#include #include -#include -#include -#include #ifndef _GNU_SOURCE #error "lttng-tools error.h needs _GNU_SOURCE" @@ -252,6 +254,10 @@ static inline void __lttng_print_check_abort(enum lttng_error_level type) } while (0); #endif +#define DBG_FMT(format_str, args...) DBG("%s", fmt::format(format_str, ##args).c_str()) +#define WARN_FMT(format_str, args...) WARN("%s", fmt::format(format_str, ##args).c_str()) +#define ERR_FMT(format_str, args...) ERR("%s", fmt::format(format_str, ##args).c_str()) + const char *error_get_str(int32_t code); /*