Problem
Changing the log level still requires a full restart. Log level is currently set only by the WH_LOG_LEVEL environment variable (cmd/wavehouse/main.go) — it has no config.yaml key, and environment values are frozen at process start, so the hot-reload mechanism from #414 can never touch it.
Split from #48, whose SIGHUP / admin-endpoint mechanism landed in #414 with dedupe.id_field and dedupe.require_id as the first hot fields.
Proposed Solution
- Add a
log.level key to config.yaml, keeping WH_LOG_LEVEL as its environment override (which pins it, per the documented env caveat in Configuration § Hot Reload).
- Classify
log.level in hotFields (internal/config/reload.go) — the drift-guard test TestReloadDiff_CoversEveryConfigField enforces the classification.
- Apply via an
OnReload hook calling slog.LevelVar.Set: the logger already reads its level through a LevelVar (cmd/wavehouse/main.go), which is safe to change at runtime.
Additional Context
Sample-rate hot reload (also mentioned in #48) can follow the same pattern later; per-table dedupe overrides are tracked separately in #222.
Problem
Changing the log level still requires a full restart. Log level is currently set only by the
WH_LOG_LEVELenvironment variable (cmd/wavehouse/main.go) — it has noconfig.yamlkey, and environment values are frozen at process start, so the hot-reload mechanism from #414 can never touch it.Split from #48, whose SIGHUP / admin-endpoint mechanism landed in #414 with
dedupe.id_fieldanddedupe.require_idas the first hot fields.Proposed Solution
log.levelkey toconfig.yaml, keepingWH_LOG_LEVELas its environment override (which pins it, per the documented env caveat in Configuration § Hot Reload).log.levelinhotFields(internal/config/reload.go) — the drift-guard testTestReloadDiff_CoversEveryConfigFieldenforces the classification.OnReloadhook callingslog.LevelVar.Set: the logger already reads its level through aLevelVar(cmd/wavehouse/main.go), which is safe to change at runtime.Additional Context
Sample-rate hot reload (also mentioned in #48) can follow the same pattern later; per-table dedupe overrides are tracked separately in #222.