From cd0b243a41af5c63f200a647bf435a50f03ad5d6 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Wed, 5 Sep 2018 10:22:23 +0200 Subject: [PATCH] Logging: Write messages from qDebug() and friends also to stdout --- pv/logging.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.30.2