]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Prefix debug messages displayed with _dbus_verbose() with a timestamp.
authorRalf Habacker <ralf.habacker@freenet.de>
Wed, 11 May 2016 06:06:04 +0000 (08:06 +0200)
committerRalf Habacker <ralf.habacker@freenet.de>
Fri, 13 May 2016 13:31:05 +0000 (15:31 +0200)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
dbus/dbus-internals.c

index ebde45affb978c4d2f28f8253c44b417a32465c7..18db69ee8262d22441010e44e195c06e5aacfdb0 100644 (file)
@@ -388,6 +388,8 @@ _dbus_verbose_real (
   va_list args;
   static dbus_bool_t need_pid = TRUE;
   int len;
+  long sec, usec;
+  _dbus_get_real_time (&sec, &usec);
   
   /* things are written a bit oddly here so that
    * in the non-verbose case we just have the one
@@ -403,6 +405,7 @@ _dbus_verbose_real (
       _dbus_print_thread ();
     }
 #endif
+  fprintf (stderr, "%ld.%06ld ", sec, usec);
 
   /* Only print pid again if the next line is a new line */
   len = strlen (format);