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
commit 7ca8556211
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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