Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add debug logs around shutdownCh #2210

Merged
merged 7 commits into from
May 8, 2024
Merged

Conversation

jackwotherspoon
Copy link
Collaborator

Add additional debug log entries around shutdownCh to allow for verification that SIGINT/SIGTERM signals are being properly sent.

@jackwotherspoon jackwotherspoon self-assigned this May 8, 2024
@jackwotherspoon jackwotherspoon requested a review from a team as a code owner May 8, 2024 14:29
@jackwotherspoon
Copy link
Collaborator Author

@enocom feel free to leave suggestions for additional spots I could add debug log entries and I'll happily add them 😄

@enocom
Copy link
Member

enocom commented May 8, 2024

There are a few other spots. Just adding a logging message directly above these lines will be good enough I think.

shutdownCh <- fmt.Errorf("unable to start: %v", err)

go func() { shutdownCh <- p.Serve(ctx, notify) }()

case shutdownCh <- errQuitQuitQuit:

shutdownCh <- fmt.Errorf("failed to start HTTP server: %v", err)

@jackwotherspoon
Copy link
Collaborator Author

There are a few other spots. Just adding a logging message directly above these lines will be good enough I think.

shutdownCh <- fmt.Errorf("unable to start: %v", err)

go func() { shutdownCh <- p.Serve(ctx, notify) }()

case shutdownCh <- errQuitQuitQuit:

shutdownCh <- fmt.Errorf("failed to start HTTP server: %v", err)

The last two don't have access to the logger so I couldn't add them...

cmd/root.go Outdated Show resolved Hide resolved
cmd/root.go Outdated Show resolved Hide resolved
@jackwotherspoon jackwotherspoon requested a review from enocom May 8, 2024 17:24
@jackwotherspoon jackwotherspoon merged commit 1c90c8a into main May 8, 2024
12 checks passed
@jackwotherspoon jackwotherspoon deleted the debug-log-shutdownCh branch May 8, 2024 17:45
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.

2 participants