Fix: lttng logs nanoseconds
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 10 Nov 2017 21:21:46 +0000 (16:21 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 25 Apr 2018 15:26:16 +0000 (11:26 -0400)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/error.c
src/common/error.h

index 2215886db1be67d5c93e3b89233c8e101f26a96d..db3042318e169e72b2e31a28874c2396976a249b 100644 (file)
@@ -59,7 +59,7 @@ const char *log_add_time(void)
 
        /* Format time in the TLS variable. */
        ret = snprintf(URCU_TLS(error_log_time).str, sizeof(URCU_TLS(error_log_time).str),
-                       "%02d:%02d:%02d.%06ld",
+                       "%02d:%02d:%02d.%09ld",
                        tm.tm_hour, tm.tm_min, tm.tm_sec, tp.tv_nsec);
        if (ret < 0) {
                goto error;
index 6fe8d8c2d3bc312d3670b2c55cef76bf42791e94..c90c4ae07a1902d73eb17cc1c7ae90af652fb9a8 100644 (file)
@@ -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);
 
This page took 0.028205 seconds and 4 git commands to generate.