summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-13 14:25:25 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-13 16:16:31 -0800
commit4c5997bcbe4bfa38bebb8abe5c6a42edcc7a1e99 (patch)
tree505535d0cf80bdc7558beab66a316fa1c8c4bee3 /qt-models
parent702d09df9fe582d253607589c4b88ccd62502883 (diff)
downloadsubsurface-4c5997bcbe4bfa38bebb8abe5c6a42edcc7a1e99.tar.gz
mobile/cleanup: reduce the noise in our logs
There are two sets of messages that tend to dominate the logs - the RSSI updates from the Qt BLE stack - the warnings about deprecated signal use in Kirigami Neither of them provide any value to us when trying to find bugs; and often they end up hiding the things that we really care about. So let's just not log them - which is easy as we have our own message handler. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/messagehandlermodel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-models/messagehandlermodel.cpp b/qt-models/messagehandlermodel.cpp
index f0807cf80..cc3f9f12d 100644
--- a/qt-models/messagehandlermodel.cpp
+++ b/qt-models/messagehandlermodel.cpp
@@ -39,6 +39,10 @@ void MessageHandlerModel::addLog(QtMsgType type, const QString& message)
if (lastMessage == newMessage)
return;
}
+ // filter extremely noisy and unhelpful messages
+ if (message.contains("Updating RSSI for") || (message.contains(QRegExp(".*kirigami.*onFoo properties in Connections"))))
+ return;
+
beginInsertRows(QModelIndex(), rowCount(), rowCount());
m_data.append({message, type});
endInsertRows();