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:39:12 +0000 (11:39 -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 938932cdc7b5cbd6ab03a1789cf9330712a8b5f2..ba50d27601d42ffb6602309b065e8814b1aace85 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 9b07e0a471054a20a85150c3dc91d2a2cda35d6c..820369c8810862e1b6e9cc780ef90bc1e9960643 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.026869 seconds and 4 git commands to generate.