Print info messages to stdout instead of stderr (#2639)

This commit is contained in:
borgmanJeremy
2022-06-02 08:38:31 -05:00
committed by GitHub
parent 7a57268ca3
commit 65e3a01360
3 changed files with 8 additions and 1 deletions

View File

@@ -14,7 +14,7 @@ CommandLineParser::CommandLineParser()
namespace {
AbstractLogger out =
AbstractLogger::info(AbstractLogger::Stderr).enableMessageHeader(false);
AbstractLogger::info(AbstractLogger::Stdout).enableMessageHeader(false);
AbstractLogger err = AbstractLogger::error(AbstractLogger::Stderr);
auto versionOption =

View File

@@ -63,6 +63,12 @@ AbstractLogger& AbstractLogger::sendMessage(QString msg, Channel channel)
QTextStream stream(stderr);
stream << messageHeader(channel, Stderr) << msg << "\n";
}
if (m_targets & Stdout) {
QTextStream stream(stdout);
stream << messageHeader(channel, Stdout) << msg << "\n";
}
return *this;
}

View File

@@ -15,6 +15,7 @@ public:
Stderr = 0x02,
LogFile = 0x08,
String = 0x10,
Stdout = 0x20,
Default = Notification | LogFile | Stderr,
};