Skip to content

Commit

Permalink
fix: don't log info and debug messages to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Jan 12, 2024
1 parent c2af666 commit 88e0926
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/lib/src/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ void Logger::setupMessageOutput(bool log)
*/
void Logger::log(const QString &message, LogLevel level)
{
static QTextStream qStdOut(stdout);
static QTextStream qStdErr(stderr);

if (level < m_level) {
Expand Down Expand Up @@ -169,11 +168,7 @@ void Logger::log(const QString &message, LogLevel level)

// Print the message to the console
if (level >= m_consoleOutputLevel) {
if (level == LogLevel::Debug || level == LogLevel::Info) {
qStdOut << strippedMsg << Qt::endl;
} else {
qStdErr << strippedMsg << Qt::endl;
}
qStdErr << strippedMsg << Qt::endl;
}

if (m_exitOnError && level == Logger::LogLevel::Error) {
Expand Down

0 comments on commit 88e0926

Please sign in to comment.