Implement new settings

Signed-off-by: denis0001-dev <denis0001.dev@ya.ru>
This commit is contained in:
2026-04-07 22:01:19 +03:00
Unverified
parent 135ac010c3
commit 87934c7448
30 changed files with 2752 additions and 271 deletions
+16
View File
@@ -0,0 +1,16 @@
---
description: Use Ktor HttpClient for debug-mode logging instead of platform APIs
alwaysApply: true
---
# Debug-mode logging with Ktor
- Prefer **Ktor `HttpClient`** for all debug/instrumentation HTTP logging in this project.
- **Do NOT** use `HttpURLConnection`, raw `OkHttpClient`, or other low-level networking APIs for debug-only logging.
- Centralize debug logging behind `ru.fromchat.debug.DebugLogger` and keep it **best-effort only** (never throw, never crash the app).
- When adding new debug logging:
- Use a shared `HttpClient` instance (per platform) configured with the appropriate engine (e.g. OkHttp on Android).
- Send JSON NDJSON-style payloads to the configured debug endpoint.
- Avoid blocking the main thread; run network I/O in coroutines on a background dispatcher.
- Keep debug logging code small and self-contained so it is easy to remove or disable when no longer needed.