X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Ferror.h;h=d40145237c68e525889a277e06c3c466c6f8033d;hb=1a10a4c15204f8aa2e955021100da443414dc6fb;hp=6fe8d8c2d3bc312d3670b2c55cef76bf42791e94;hpb=e6142f2e647e83238b1e399b1264e8adb05409f9;p=lttng-tools.git diff --git a/src/common/error.h b/src/common/error.h index 6fe8d8c2d..d40145237 100644 --- a/src/common/error.h +++ b/src/common/error.h @@ -48,8 +48,8 @@ * every time a log is fired. */ struct log_time { - /* Format: 00:00:00.000000 plus NULL byte. */ - char str[16]; + /* Format: 00:00:00.000000000 plus NULL byte. */ + char str[19]; }; extern DECLARE_URCU_TLS(struct log_time, error_log_time); @@ -151,11 +151,11 @@ static inline void __lttng_print_check_abort(enum lttng_error_level type) /* Three level of debug. Use -v, -vv or -vvv for the levels */ #define _ERRMSG(msg, type, fmt, args...) __lttng_print(type, msg \ " - %s [%ld/%ld]: " fmt " (in %s() at " __FILE__ ":" XSTR(__LINE__) ")\n", \ - log_add_time(), (long) getpid(), (long) gettid(), ## args, __func__) + log_add_time(), (long) getpid(), (long) lttng_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) + log_add_time(), (long) getpid(), (long) lttng_gettid(), ## args) #define MSG(fmt, args...) \ __lttng_print(PRINT_MSG, fmt "\n", ## args) @@ -234,6 +234,6 @@ 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(); +const char *log_add_time(void); #endif /* _ERROR_H */