mirror of
https://github.com/fromchat-messenger/app.git
synced 2026-09-23 03:25:06 +03:00
Implement new settings
Signed-off-by: denis0001-dev <denis0001.dev@ya.ru>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user