Cleanup: rotation-thread: enforce conding standard following fix
[lttng-tools.git] / src / common / error.hpp
index 8b8e4364530bfcaccc7113697eaed0ff9d8a3bac..390c4dccc1ada97dbbe8e6b886791366eac0ddc1 100644 (file)
@@ -9,14 +9,16 @@
 #define _ERROR_H
 
 #include <common/compat/errno.hpp>
-#include <stdio.h>
+#include <common/compat/time.hpp>
+#include <common/format.hpp>
+#include <common/macros.hpp>
+#include <common/string-utils/format.hpp>
+
+#include <stdbool.h>
 #include <stdint.h>
+#include <stdio.h>
 #include <string.h>
-#include <stdbool.h>
 #include <urcu/tls-compat.h>
-#include <common/compat/time.hpp>
-#include <common/string-utils/format.hpp>
-#include <common/macros.hpp>
 
 #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);
 
 /*
This page took 0.023584 seconds and 4 git commands to generate.