chatgui: clean up log — remove spam, move messages to proper categories

A-B: Remove gui_bridge_post_uasync_fn log, MainWindow::onMessageReceived, InputBar send text
B1: Move lifecycle messages to GENERAL (utun_node, main, mainwindow, animtimer, sound_manager, messagelist, db_manager)
B2: Move chat events to CHAT_SYNC (MSG_RECEIVED, CHANNEL_UPDATED, CHANNEL_PEERS_ONLINE, DB_READY)
B3: Move peer/connect events to MEMBER_SYNC (CONNECT_RESULT, NEW_PEER, AUTO_CONNECT, NODE_CHANGED)
C: Lower level of C-side spam (recalc, send OK, PUSH ACK, connect_channel) INFO->DEBUG
D: Fix duplicate PUSH log line in db_sync.c
E: Add debounce to CHANNEL_PEERS_ONLINE — log only on change
Misc: Remove sort=0 from ChannelList::loadChannels, improve DB_READY message
This commit is contained in:
evgeny committed 2026-08-05 12:50:27 +03:00
1 parent be0e76c9a6
commit 5feeb2c169
12 files changed
+49 -58

No files matched your search

+6 -10
View File
@@ -97,15 +97,15 @@ MainWindow::MainWindow(QWidget *parent, DbManager* db, const QString& cfgPath,
MainWindow::~MainWindow() {
if (m_recorder) { m_recorder->shutdown(); m_recorder = nullptr; }
SoundManager::instance()->shutdown();
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "MainWindow: ~MainWindow — saving channel state");
DEBUG_DEBUG(DEBUG_CATEGORY_GENERAL, "MainWindow: ~MainWindow — saving channel state");
if (m_messageList) m_messageList->saveChannelState();
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "MainWindow: ~MainWindow — stopping utun node");
DEBUG_DEBUG(DEBUG_CATEGORY_GENERAL, "MainWindow: ~MainWindow — stopping utun node");
if (m_node) { m_node->stop(); delete m_node; m_node = nullptr; }
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "MainWindow: ~MainWindow — node stop+delete done");
DEBUG_DEBUG(DEBUG_CATEGORY_GENERAL, "MainWindow: ~MainWindow — node stop+delete done");
AnimTimer::shutdown();
MessageList::cleanupAnimations();
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "MainWindow: ~MainWindow — animations cleaned");
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "MainWindow: ~MainWindow done");
DEBUG_DEBUG(DEBUG_CATEGORY_GENERAL, "MainWindow: ~MainWindow — animations cleaned");
DEBUG_DEBUG(DEBUG_CATEGORY_GENERAL, "MainWindow: ~MainWindow done");
}
void MainWindow::setupUi() {
@@ -330,7 +330,7 @@ void MainWindow::setupTray() {
}
void MainWindow::closeEvent(QCloseEvent *event) {
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "MainWindow: closeEvent — hiding to tray");
DEBUG_DEBUG(DEBUG_CATEGORY_GENERAL, "MainWindow: closeEvent — hiding to tray");
hide();
m_trayIcon->showMessage("Chat", "Application minimized to tray.",
QSystemTrayIcon::Information, 2000);
@@ -408,8 +408,6 @@ void MainWindow::showSettings() {
void MainWindow::onMessageReceived(const char* ch_id, int ch_id_len, uint64_t author) {
QString cid = QString::fromUtf8(ch_id, ch_id_len);
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "MainWindow::onMessageReceived ch=%s author=%llu cur=%s",
qPrintable(cid), (unsigned long long)author, qPrintable(m_currentChannelId));
if (m_db && author != m_db->myNodeId())
SoundManager::instance()->play("msg_incoming");
if (m_messageList) {
@@ -442,8 +440,6 @@ void MainWindow::onAutoConnectStatus(uint8_t status, uint16_t /*total_tried*/,
void MainWindow::onChannelPeersOnline(const char* ch_id, int ch_id_len, uint16_t online) {
if (m_channelList) {
QString cid = QString::fromUtf8(ch_id, ch_id_len);
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "MainWindow::onChannelPeersOnline cid=%s online=%u",
qPrintable(cid), online);
m_channelList->setChannelPeersOnline(cid, (int)online);
}
}