You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
config: warnings in parse() emit before logging is configured (ignores logging.format/level) #113
Surfaced during code review of #111 (finding 5, skipped as pre-existing).
Problem
config.parse() emits slog.Warn(...) — the new dashboard deprecation warning, and the pre-existing unknown-tier / DEVCLOUD_SERVICES warnings — beforesetupLogging() installs the configured slog handler in cmd/devcloud/main.go.
As a result these warnings always go through the default text handler and ignore the operator's logging.format / logging.level. With logging: {format: json}, the warnings come out as plain text and break downstream JSON log parsers.
Why it was deferred
Consistent with the existing warning pattern already in parse() (not introduced by #111). A proper fix means reordering startup so logging is configured before config warnings are produced — and must avoid suppressing the warnings entirely.
Suggested fix
Options:
Collect warnings during parse() and flush them after setupLogging(), or
Return them from parse()/Load() for the caller to log post-setup, or
Configure logging early enough that parse() warnings honor logging.format.
Acceptance
With logging.format: json, config-time warnings are emitted as JSON and respect logging.level.
Activity
fix: config warnings honor logging.format/level (#113) (#119)