From: Soeren Apel Date: Wed, 5 Sep 2018 08:22:23 +0000 (+0200) Subject: Logging: Write messages from qDebug() and friends also to stdout X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=cd0b243a41af5c63f200a647bf435a50f03ad5d6 Logging: Write messages from qDebug() and friends also to stdout --- diff --git a/pv/logging.cpp b/pv/logging.cpp index 83577af2..b04bd948 100644 --- a/pv/logging.cpp +++ b/pv/logging.cpp @@ -20,6 +20,8 @@ #include "logging.hpp" #include "globalsettings.hpp" +#include + #ifdef ENABLE_DECODE #include /* First, so we avoid a _POSIX_C_SOURCE warning. */ #endif @@ -28,6 +30,8 @@ #include +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)