From: Soeren Apel Date: Fri, 15 Nov 2019 18:08:35 +0000 (+0100) Subject: Logging: Break srd stacktraces up into proper newlines X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=1cd18add4338ac52f68f34b802fed2a53ec157a4;p=pulseview.git Logging: Break srd stacktraces up into proper newlines --- diff --git a/pv/logging.cpp b/pv/logging.cpp index b747ab54..e42a9e54 100644 --- a/pv/logging.cpp +++ b/pv/logging.cpp @@ -189,7 +189,10 @@ int Logging::log_srd(void *cb_data, int loglevel, const char *format, va_list ar va_end(args2); char *text = g_strdup_vprintf(format, args); - logging.log(QString::fromUtf8(text), LogSource_srd); + + QString s = QString::fromUtf8(text); + for (QString& substring : s.split("\n", QString::SkipEmptyParts)) + logging.log(substring, LogSource_srd); g_free(text); return SR_OK;