android: debug categories from GUI, fix poll log format, event loop sleeps until traffic
- android_jni_bridge: utun_bridge_set_debug_level actually calls debug_set_level / debug_set_category_level_by_name (was stub) - SettingsScreen: CATEGORIES updated to match current g_debug_categories from debug_config.c - ConfigProvider: persist category levels in [debug] section of generated INI config - u_async: poll() log uses computed timeout_ms instead of confusing %d.%dms format - u_async: timeout_node char name[16] → const char* name (no truncation, smaller struct) - memory_pool: pool alloc/free debug logs moved from DEBUG to TRACE - instance_lite: poll timeout changed from 10ms (100tb) to infinite (-1) — sleeps until traffic - instance_lite: removed useless heartbeat timer
This commit is contained in:
1 parent
a73cc1beea
commit
5d02a6d419
6 files changed
+41
-44
No files matched your search
@@ -339,6 +339,13 @@ class ConfigProvider(private val context: Context) {
|
||||
appendLine()
|
||||
appendLine("[debug]")
|
||||
appendLine("console_level=info")
|
||||
val dbgCat = getString("debug.categories") ?: ""
|
||||
if (dbgCat.isNotEmpty()) {
|
||||
for (entry in dbgCat.split(",")) {
|
||||
val trimmed = entry.trim()
|
||||
if (trimmed.isNotEmpty()) appendLine(trimmed)
|
||||
}
|
||||
}
|
||||
val udpIp = getString("log_udp.ip") ?: ""
|
||||
val udpPort = getInt("log_udp.port")
|
||||
if (udpIp.isNotEmpty() && udpPort > 0) {
|
||||
|
||||
@@ -28,10 +28,11 @@ import java.util.UUID
|
||||
|
||||
private val LEVELS = listOf("NONE", "ERROR", "WARN", "INFO", "DEBUG", "TRACE")
|
||||
private val CATEGORIES = listOf(
|
||||
"UASYNC", "LL_QUEUE", "CONNECTION", "ETCP", "CRYPTO", "MEMORY",
|
||||
"TIMING", "CONFIG", "TUN", "ROUTING", "TIMERS", "NORMALIZER", "BGP",
|
||||
"SOCKET", "CONTROL", "DUMP", "TRAFFIC", "DEBUG", "GENERAL", "NAT",
|
||||
"KEEPALIVE", "ETCPROUTE", "BBR", "ETCP_DUMP", "CONNECTIVITY", "DB_SYNC"
|
||||
"sys", "connection", "etcp", "crypto",
|
||||
"config", "tun", "routing", "timers", "bgp", "chat",
|
||||
"socket", "control", "dump", "traffic", "debug", "general",
|
||||
"nat", "keepalive", "media", "etcp_route", "etcp_dump",
|
||||
"chat_sync", "member_sync", "proxy"
|
||||
)
|
||||
private val PROTOCOLS = listOf("tcp", "udp")
|
||||
|
||||
|
||||
Reference in new issue
Block a user