From cd2618246a01dbabafa8e48b5c68a4eda75b624b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 29 Oct 2019 22:07:18 -0600 Subject: [PATCH] make it more likely that debug messages are printed without x-thread interruption --- libs/pbd/debug.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/pbd/debug.cc b/libs/pbd/debug.cc index c0c6ab65db..7fe7a1b90b 100644 --- a/libs/pbd/debug.cc +++ b/libs/pbd/debug.cc @@ -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