fix: demote spam auto_connect logs to DEBUG_DEBUG

Remain at INFO: attempt + result FAIL. Demoted to DEBUG: TIMEOUT,
CANCELLED, GC closing, flight launched, AUTO_CONNECT in_progress.
This commit is contained in:
Evgeny committed 2026-07-16 21:11:53 +03:00
1 parent 1869f7b360
commit 0e702a8ff4
3 files changed
+7 -7

No files matched your search

+4 -4
View File
@@ -837,8 +837,8 @@ static void ca_timeout_cb(void* arg) {
if (st->delivered || st->cancelled) return;
st->timers[ctx->addr_index] = NULL;
st->pending_count--;
DEBUG_INFO(DEBUG_CATEGORY_CONNECTIVITY, "%s: auto_connect TIMEOUT idx=%d pending=%d/%d peer=0x%016llx",
CC_ID, ctx->addr_index, st->pending_count, st->addr_count, (unsigned long long)st->node_id);
DEBUG_DEBUG(DEBUG_CATEGORY_CONNECTIVITY, "%s: auto_connect TIMEOUT idx=%d pending=%d/%d peer=0x%016llx",
CC_ID, ctx->addr_index, st->pending_count, st->addr_count, (unsigned long long)st->node_id);
if (st->pending_count <= 0 && !st->delivered) {
st->delivered = 1;
st->result_cb(CONN_MGR_ERR_TIMEOUT, st->node_id, st->result_arg);
@@ -849,8 +849,8 @@ void chat_core_connect_auto_cancel(void* state) {
if (!state) return;
struct ca_state* st = (struct ca_state*)state;
st->cancelled = 1;
DEBUG_INFO(DEBUG_CATEGORY_CONNECTIVITY, "%s: auto_connect CANCELLED peer=0x%016llx",
CC_ID, (unsigned long long)st->node_id);
DEBUG_DEBUG(DEBUG_CATEGORY_CONNECTIVITY, "%s: auto_connect CANCELLED peer=0x%016llx",
CC_ID, (unsigned long long)st->node_id);
for (int i = 0; i < st->addr_count; i++) {
if (st->timers[i]) { uasync_cancel_timeout(st->inst->ua, st->timers[i]); st->timers[i] = NULL; }
if (st->conns[i]) { etcp_connection_close(st->conns[i]); st->conns[i] = NULL; }
+2 -2
View File
@@ -110,7 +110,7 @@ static void ac_gc(struct auto_connect* ac) {
continue;
}
/* expired and not up — cancel */
DEBUG_INFO(DEBUG_CATEGORY_CONNECTIVITY, "%s: GC closing flight node=0x%016llx (expired)", AC_ID, (unsigned long long)nid);
DEBUG_DEBUG(DEBUG_CATEGORY_CONNECTIVITY, "%s: GC closing flight node=0x%016llx (expired)", AC_ID, (unsigned long long)nid);
chat_core_connect_auto_cancel(ac->flights[i].ca_state);
memset(&ac->flights[i], 0, sizeof(ac->flights[i]));
}
@@ -185,7 +185,7 @@ static void ac_fill(struct auto_connect* ac) {
f->node_id = 0; f->created_tb = 0;
continue;
}
DEBUG_INFO(DEBUG_CATEGORY_CONNECTIVITY, "%s: flight[%d] launched node=0x%016llx", AC_ID, slot, (unsigned long long)nid);
DEBUG_DEBUG(DEBUG_CATEGORY_CONNECTIVITY, "%s: flight[%d] launched node=0x%016llx", AC_ID, slot, (unsigned long long)nid);
uint8_t evt[7]; evt[0] = 0; uint16_t t = 0, n = (uint16_t)ac->channel_count, s = 0;
memcpy(evt + 1, &t, 2); memcpy(evt + 3, &n, 2); memcpy(evt + 5, &s, 2);
gui_bridge_post(GUI_EVT_AUTO_CONNECT_STATUS, evt, 7);
+1 -1
View File
@@ -108,7 +108,7 @@ void GuiBridgeReceiver::processPost(int eventType, QByteArray data) {
uint16_t node_count; memcpy(&node_count, d + 3, 2);
uint16_t connected; memcpy(&connected, d + 5, 2);
const char* st_str = status == 0 ? "in_progress" : status == 1 ? "done" : "stopped";
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "gui_bridge: AUTO_CONNECT %s tried=%u/%u connected=%u", st_str, total_tried, node_count, connected);
if (status != 0) DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "gui_bridge: AUTO_CONNECT %s tried=%u/%u connected=%u", st_str, total_tried, node_count, connected);
if (g_auto_connect_status_cb) g_auto_connect_status_cb(status, total_tried, node_count, connected);
}
break;