Skip to content

Conversation

@dandavison
Copy link
Contributor

@dandavison dandavison commented Jan 12, 2026

What was changed

Use slog.LevelVar to suppress logger warnings during start-dev shutdown if the user has not set the log level.

Why?

The warnings during shutdown are expected and damage UX.

Checklist

  1. How was this tested:
    Built and ran manually. Confirmed --log-level was respected. Issued ctrl-c and confirmed no shutdown warnings on server start-dev but shutdown warnings on server start-dev --log-level warn

@dandavison dandavison marked this pull request as ready for review January 12, 2026 16:28
@dandavison dandavison requested review from a team as code owners January 12, 2026 16:28
@dandavison dandavison requested a review from stephanos January 12, 2026 16:30
Comment on lines 168 to 171
if !t.Parent.Parent.LogLevel.ChangedFromDefault {
s.SuppressWarnings()
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a short comment to explain why we're doing this? People might forget/not know how verbose the logs are on shutdown.

@dandavison dandavison force-pushed the stop-shutdown-log-noise branch from 5597e50 to 6bfd3ff Compare January 12, 2026 20:50
@dandavison dandavison merged commit f2d230b into main Jan 12, 2026
8 checks passed
@dandavison dandavison deleted the stop-shutdown-log-noise branch January 12, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants