diff --git a/src/Cache.cpp b/src/Cache.cpp
index 0bfc2842..d74bbe91 100644
--- a/src/Cache.cpp
+++ b/src/Cache.cpp
@@ -1065,8 +1065,8 @@ Cache::saveInvite(lmdb::txn &txn,
lmdb::val(json(msg).dump()));
if (!res)
- std::cout << "couldn't save data" << json(msg).dump()
- << '\n';
+ nhlog::db()->warn("couldn't save data: {}",
+ json(msg).dump());
},
e);
}
diff --git a/src/TextInputWidget.cpp b/src/TextInputWidget.cpp
index 5e63eca5..b481a57c 100644
--- a/src/TextInputWidget.cpp
+++ b/src/TextInputWidget.cpp
@@ -537,7 +537,7 @@ TextInputWidget::TextInputWidget(QWidget *parent)
emit input_->resultsRetrieved(cache::searchUsers(
ChatPage::instance()->currentRoom().toStdString(), q));
} catch (const lmdb::error &e) {
- std::cout << e.what() << '\n';
+ nhlog::db()->error("Suggestion retrieval failed: {}", e.what());
}
});
});
diff --git a/src/main.cpp b/src/main.cpp
index ec96f0ec..37b38c1b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -15,6 +15,8 @@
* along with this program. If not, see .
*/
+#include
+
#include
#include
#include
@@ -43,15 +45,15 @@
#include "emoji/MacHelper.h"
#endif
-#if defined(Q_OS_LINUX)
-#include
-#include
-
#ifdef QML_DEBUGGING
#include
QQmlDebuggingEnabler enabler;
#endif
+#if defined(Q_OS_LINUX)
+#include
+#include
+
void
stacktraceHandler(int signum)
{