Cleanup: rotation-thread: enforce conding standard following fix
[lttng-tools.git] / src / common / error.hpp
index fdae1e72c293bb0aefc16b008621dfb772993033..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);
 
 /*
@@ -259,7 +265,7 @@ const char *error_get_str(int32_t code);
  * the caller. On error, an empty string is returned thus no time will be
  * printed in the log.
  */
-const char *log_add_time(void);
+const char *log_add_time();
 
 /* Name must be a statically-allocated string. */
 void logger_set_thread_name(const char *name, bool set_pthread_name);
This page took 0.024231 seconds and 4 git commands to generate.