summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/log.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/log.cpp b/common/log.cpp
index 55f6b1f..40d9509 100644
--- a/common/log.cpp
+++ b/common/log.cpp
@@ -400,7 +400,11 @@ QDebug Sink::Log::debugStream(DebugLevel debugLevel, int line, const char *file,
400 bool showLocation = debugOutput.isEmpty() ? false : caseInsensitiveContains("location", debugOutput); 400 bool showLocation = debugOutput.isEmpty() ? false : caseInsensitiveContains("location", debugOutput);
401 bool showFunction = debugOutput.isEmpty() ? false : caseInsensitiveContains("function", debugOutput); 401 bool showFunction = debugOutput.isEmpty() ? false : caseInsensitiveContains("function", debugOutput);
402 bool showProgram = debugOutput.isEmpty() ? false : caseInsensitiveContains("application", debugOutput); 402 bool showProgram = debugOutput.isEmpty() ? false : caseInsensitiveContains("application", debugOutput);
403#ifdef Q_OS_WIN
403 bool useColor = true; 404 bool useColor = true;
405#else
406 bool useColor = false;
407#endif
404 bool multiline = false; 408 bool multiline = false;
405 409
406 const QString resetColor = colorCommand(ANSI_Colors::Reset); 410 const QString resetColor = colorCommand(ANSI_Colors::Reset);
@@ -437,10 +441,15 @@ QDebug Sink::Log::debugStream(DebugLevel debugLevel, int line, const char *file,
437 } 441 }
438 output += ":"; 442 output += ":";
439 443
444#ifdef Q_OS_WIN
445 //If we print to std::cout we won't see the messages in DebugView
446 QDebug debug(QtDebugMsg);
447#else
440 if (sDebugStream.isDestroyed()) { 448 if (sDebugStream.isDestroyed()) {
441 return QDebug{QtDebugMsg}; 449 return QDebug{QtDebugMsg};
442 } 450 }
443 QDebug debug(sDebugStream); 451 QDebug debug(sDebugStream);
452#endif
444 453
445 debug.noquote().nospace() << output; 454 debug.noquote().nospace() << output;
446 455