Document Phase 4b master debug control in ENV_VARS.md
Add documentation for new HAKMEM_DEBUG_ALL and HAKMEM_DEBUG_LEVEL environment variables introduced in Phase 4b. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -336,7 +336,32 @@ ENV Statistics (from ENV_VARIABLE_SURVEY.md):
|
|||||||
- Free Path Optimization: 15 (7%)
|
- Free Path Optimization: 15 (7%)
|
||||||
- Other: 23 (10%)
|
- Other: 23 (10%)
|
||||||
|
|
||||||
Future Work (Phase 4b+):
|
Phase 4b: Master Debug Control (COMPLETED)
|
||||||
- HAKMEM_DEBUG unified variable (consolidate 35 debug vars)
|
------------------------------------------
|
||||||
|
New in 2025-11: Centralized debug control that works alongside individual module ENVs.
|
||||||
|
|
||||||
|
- `HAKMEM_DEBUG_ALL=1`
|
||||||
|
- Enable ALL debug modules at once (convenient for troubleshooting)
|
||||||
|
- Individual module ENVs (e.g., HAKMEM_SFC_DEBUG=0) can still override
|
||||||
|
|
||||||
|
- `HAKMEM_DEBUG_LEVEL=N`
|
||||||
|
- Set debug level: 0=off, 1=critical, 2=normal, 3=verbose
|
||||||
|
- When set to 2+, enables debug output for modules that don't have explicit ENV
|
||||||
|
|
||||||
|
- `HAKMEM_QUIET=1`
|
||||||
|
- Suppress ALL debug output (highest priority, overrides DEBUG_ALL/LEVEL)
|
||||||
|
|
||||||
|
Priority order:
|
||||||
|
1. HAKMEM_QUIET=1 → suppress all
|
||||||
|
2. Specific module ENV (e.g., HAKMEM_SFC_DEBUG=1) → use that value
|
||||||
|
3. HAKMEM_DEBUG_ALL=1 → enable all
|
||||||
|
4. HAKMEM_DEBUG_LEVEL >= threshold → enable
|
||||||
|
5. Default → disabled
|
||||||
|
|
||||||
|
Implementation: core/hakmem_debug_master.h
|
||||||
|
- hak_debug_check("HAKMEM_FOO_DEBUG") - Check if module should enable debug
|
||||||
|
- hak_is_quiet() - Quick check for quiet mode
|
||||||
|
|
||||||
|
Future Work (Phase 4c+):
|
||||||
- HAKMEM_TRACE unified variable (consolidate 15 trace vars)
|
- HAKMEM_TRACE unified variable (consolidate 15 trace vars)
|
||||||
- HAKMEM_STATS unified variable (consolidate 15 dump vars)
|
- HAKMEM_STATS unified variable (consolidate 15 dump vars)
|
||||||
|
|||||||
Reference in New Issue
Block a user