Fix issues with log level handling (#4254)

This commit is contained in:
Alexandru Ionut Tripon
2025-11-16 18:13:12 +02:00
committed by GitHub
8 changed files with 70 additions and 72 deletions

View File

@@ -126,7 +126,11 @@ class XmlLogParseTest : public QObject {
last = entry.level;
} else if (std::holds_alternative<LogParser::PlainText>(item)) {
auto msg = std::get<LogParser::PlainText>(item).message;
auto level = LogParser::guessLevel(msg, last);
auto level = LogParser::guessLevel(msg);
if (level == MessageLevel::Unknown)
level = last;
out.append(std::make_pair(level, msg));
last = level;
}

View File

@@ -1,11 +1,11 @@
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
INFO
INFO
INFO

View File

@@ -1,10 +1,10 @@
INFO
INFO
INFO
INFO
INFO
INFO
INFO
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
INFO
INFO
INFO