Backport: add DBG_NO_LOC logging macro
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 3 Jul 2018 01:13:23 +0000 (21:13 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 21 Sep 2018 04:00:52 +0000 (00:00 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/error.h

index 820369c8810862e1b6e9cc780ef90bc1e9960643..a0627068f644fc12359dc45a63f7f9ec5bfae144 100644 (file)
@@ -153,6 +153,10 @@ static inline void __lttng_print_check_abort(enum lttng_error_level type)
                " - %s [%ld/%ld]: " fmt " (in %s() at " __FILE__ ":" XSTR(__LINE__) ")\n", \
                        log_add_time(), (long) getpid(), (long) gettid(), ## args, __func__)
 
+#define _ERRMSG_NO_LOC(msg, type, fmt, args...) __lttng_print(type, msg        \
+               " - %s [%ld/%ld]: " fmt "\n", \
+               log_add_time(), (long) getpid(), (long) gettid(), ## args)
+
 #define MSG(fmt, args...) \
        __lttng_print(PRINT_MSG, fmt "\n", ## args)
 #define _MSG(fmt, args...) \
@@ -165,6 +169,7 @@ static inline void __lttng_print_check_abort(enum lttng_error_level type)
 #define BUG(fmt, args...) _ERRMSG("BUG", PRINT_BUG, fmt, ## args)
 
 #define DBG(fmt, args...) _ERRMSG("DEBUG1", PRINT_DBG, fmt, ## args)
+#define DBG_NO_LOC(fmt, args...) _ERRMSG_NO_LOC("DEBUG1", PRINT_DBG, fmt, ## args)
 #define DBG2(fmt, args...) _ERRMSG("DEBUG2", PRINT_DBG2, fmt, ## args)
 #define DBG3(fmt, args...) _ERRMSG("DEBUG3", PRINT_DBG3, fmt, ## args)
 #define LOG(type, fmt, args...)                        \
This page took 0.02758 seconds and 5 git commands to generate.