core/log: encode category log levels

This commit is contained in:
outfoxxed 2024-09-10 04:48:54 -07:00
parent a82fbf40c2
commit 01deefe241
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
3 changed files with 39 additions and 8 deletions

View file

@ -110,6 +110,8 @@ public:
[[nodiscard]] QtMsgType defaultLevel() const;
[[nodiscard]] bool isSparse() const;
[[nodiscard]] CategoryFilter getFilter(QLatin1StringView category);
signals:
void logMessage(LogMessage msg, bool showInSparse);
@ -126,6 +128,7 @@ private:
QList<qt_logging_registry::QLoggingRule>* rules = nullptr;
QtMsgType mDefaultLevel = QtWarningMsg;
QHash<const void*, CategoryFilter> sparseFilters;
QHash<QLatin1StringView, CategoryFilter> allFilters;
QTextStream stdoutStream;
LoggingThreadProxy threadProxy;