Skip to main content

Module logging

Module logging 

Source
Expand description

Split out of the single-file bootstrap module unchanged (SPEC_LARGE_FILE_MODULE_ANALYSIS_2026_09_30.md §4.3).

Constants§

LOGIN_PATH_REFRESH_DELAY 🔒
How long after boot the cached login-shell PATH is re-checked. Long enough that the shell spawn (1-2 s of CPU with oh-my-zsh/conda/nvm) doesn’t compete with the window loading.

Functions§

enrich_path
Step 1b: PATH enrichment for a GUI launch. Every Finder/Dock launch gets launchd’s stripped PATH (the launcher spawns srv with it), so this runs on every macOS launch, not only on dev paths, and it runs before ESTART: the window can’t start until it is done. An interactive login shell costs 1-2 s, so the result is cached in the shared dir and reused while the shell’s startup files are unchanged, then re-checked in the background. See SPEC_TOOLCHAIN_MANAGER_2026-06-15 §3.1.
init_logging
Initialize tracing with dual output: JSON rolling file + human-readable stderr. Returns a guard that must be held for the lifetime of the app to ensure log flushing.
install_log_bridge 🔒
Route log crate records into tracing, at info and above.