mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
extend PBD::Debug API to provide a method that doesn't send to debug Transmitter
This commit is contained in:
parent
36ada549b2
commit
a59c217205
2 changed files with 9 additions and 1 deletions
|
|
@ -100,13 +100,20 @@ PBD::new_debug_bit (const char* name)
|
|||
}
|
||||
|
||||
void
|
||||
PBD::debug_print (const char* prefix, string str)
|
||||
PBD::debug_only_print (const char* prefix, string str)
|
||||
{
|
||||
if ((PBD::debug_bits & DEBUG::DebugTimestamps).any()) {
|
||||
printf ("%ld %s: %s", g_get_monotonic_time(), prefix, str.c_str());
|
||||
} else {
|
||||
printf ("%s: %s", prefix, str.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PBD::debug_print (const char* prefix, string str)
|
||||
{
|
||||
debug_only_print (prefix, str);
|
||||
|
||||
if ((PBD::debug_bits & DEBUG::DebugLogToGUI).any()) {
|
||||
std::replace (str.begin (), str.end (), '\n', ' ');
|
||||
debug << prefix << ": " << str << endmsg;
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ namespace PBD {
|
|||
LIBPBD_API extern DebugBits debug_bits;
|
||||
LIBPBD_API DebugBits new_debug_bit (const char* name);
|
||||
LIBPBD_API void debug_print (const char* prefix, std::string str);
|
||||
LIBPBD_API void debug_only_print (const char* prefix, std::string str);
|
||||
LIBPBD_API void set_debug_bits (DebugBits bits);
|
||||
LIBPBD_API int parse_debug_options (const char* str);
|
||||
LIBPBD_API void list_debug_options ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue