Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / library / log / AGENTS.md

AGENTS.md1.6 KiBRenderedCodeRaw
1# AGENTS.md — library/log/ (':library:log')
2
3> Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `library/log/` + allowed shared modules. Do not root-scan.
4
5<!-- last-reviewed: 2026-10-16 -->
6- Gradle: :library:log / dir: library/log/
7- Package roots present: (logging facade — one package)
8- Entry files: Log.kt + MaInitProvider.kt (no MainActivity/Route — library)
9- Deps: (none)
10- Metadata: metadata_data/library-log.md (absent — libraries have none by design)
11- Rust: no / screenshotTest: no
12
13## Overview
14**Purpose:** Repo-wide logging facade — `Log` replaces `android.util.Log` everywhere (the literal `android.util.Log` import is lint-flagged). `MaInitProvider` (a `ContentProvider` merged from this module's manifest) inits the dev gate from the `debuggable` flag, which is why per-app `XxxApplication` classes were deleted.
15**How to use:** `Log.d/tag` etc. everywhere; never `android.util.Log`. Dev-vs-release follows the manifest `debuggable` flag automatically — no per-app init code.
16**Entry points:** `Log.kt` → `MaInitProvider.kt`.
17**Gotchas:** This card was missing entirely (no AGENTS.md existed) — it was created by the agent-docs redesign. If an app still has an `Application` subclass doing only `Log.init`, delete it (everysync's is the exception — it schedules sync).
18
19## Key files
20- com/vayunmathur/library/log/Log.kt — the facade (use this, never `android.util.Log`)
21- com/vayunmathur/library/log/MaInitProvider.kt — dev-gate init via manifest merger
22
23## Verify (this module only)
24```
25./gradlew :library:log:compileDevKotlin
26./gradlew :library:log:lint
27```