]> sigrok.org Git - pulseview.git/commitdiff
Logging: Write messages from qDebug() and friends also to stdout
authorSoeren Apel <redacted>
Wed, 5 Sep 2018 08:22:23 +0000 (10:22 +0200)
committerUwe Hermann <redacted>
Wed, 5 Sep 2018 22:25:00 +0000 (00:25 +0200)
pv/logging.cpp

index 83577af200cee7afff6b0cb384a485d63883256a..b04bd9480ac717b82f34674b53d6c50edc9d3ea0 100644 (file)
@@ -20,6 +20,8 @@
 #include "logging.hpp"
 #include "globalsettings.hpp"
 
+#include <iostream>
+
 #ifdef ENABLE_DECODE
 #include <libsigrokdecode/libsigrokdecode.h> /* First, so we avoid a _POSIX_C_SOURCE warning. */
 #endif
@@ -28,6 +30,8 @@
 
 #include <QApplication>
 
+using std::cout;
+using std::endl;
 using std::lock_guard;
 
 namespace pv {
@@ -148,6 +152,8 @@ void Logging::log_pv(QtMsgType type, const QMessageLogContext &context, const QS
        (void)context;
 
        logging.log(msg, LogSource_pv);
+
+       cout << msg.toUtf8().data() << endl;
 }
 
 int Logging::log_sr(void *cb_data, int loglevel, const char *format, va_list args)