make it more likely that debug messages are printed without x-thread interruption
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 30 Oct 2019 04:07:18 +0000 (22:07 -0600)
committerPaul Davis <paul@linuxaudiosystems.com>
Sat, 2 Nov 2019 22:32:18 +0000 (16:32 -0600)
libs/pbd/debug.cc

index c0c6ab65db93ad218ce955af82872de4f6eac0c3..7fe7a1b90b473ee74d195fd6793f2911e9e208f9 100644 (file)
@@ -100,9 +100,10 @@ void
 PBD::debug_print (const char* prefix, string str)
 {
        if ((PBD::debug_bits & DEBUG::DebugTimestamps).any()) {
-               cout << g_get_monotonic_time() << ' ';
+               printf ("%ld %s: %s", g_get_monotonic_time(), prefix, str.c_str());
+       } else {
+               printf ("%s: %s", prefix, str.c_str());
        }
-       cout << prefix << ": " << str;
 }
 
 int