forked from quickshell/quickshell
core/log: add read-log --filter
This commit is contained in:
parent
0fc98652a8
commit
c2b4610acb
4 changed files with 232 additions and 19 deletions
|
@ -33,6 +33,7 @@ struct LogMessage {
|
|||
QDateTime time;
|
||||
QLatin1StringView category;
|
||||
QByteArray body;
|
||||
quint16 readCategoryId = 0;
|
||||
|
||||
static void formatMessage(QTextStream& stream, const LogMessage& msg, bool color, bool timestamp);
|
||||
};
|
||||
|
@ -63,6 +64,8 @@ struct CategoryFilter {
|
|||
, warn(category->isWarningEnabled())
|
||||
, critical(category->isCriticalEnabled()) {}
|
||||
|
||||
[[nodiscard]] bool shouldDisplay(QtMsgType type) const;
|
||||
|
||||
bool debug = true;
|
||||
bool info = true;
|
||||
bool warn = true;
|
||||
|
@ -95,7 +98,7 @@ private:
|
|||
LoggingThreadProxy threadProxy;
|
||||
};
|
||||
|
||||
bool readEncodedLogs(QIODevice* device);
|
||||
bool readEncodedLogs(QIODevice* device, const QString& rulespec);
|
||||
|
||||
} // namespace qs::log
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue