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

Display error output from dynamiclistener.Server when in debug mode. #273

Merged

Conversation

ericpromislow
Copy link
Contributor

@ericpromislow ericpromislow commented Sep 4, 2024

Related to #46956 (v2.10)

This change let's the user of the Steve CLI decide whether to see panic output with --debug on,
or squelched otherwise.

@ericpromislow ericpromislow requested a review from a team as a code owner September 4, 2024 17:50
main.go Outdated
@@ -38,5 +39,5 @@ func run(_ *cli.Context) error {
if err != nil {
return err
}
return s.ListenAndServe(ctx, config.HTTPSListenPort, config.HTTPListenPort, nil)
return s.ListenAndServe(ctx, config.HTTPSListenPort, config.HTTPListenPort, &server.ListenOpts{DisplayServerLogs: debugconfig.Debug})
Copy link
Contributor

Choose a reason for hiding this comment

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

Those logs should pretty much always be set. I shouldn't have to run with --debug to see panics imo. They are error logs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then we should drop that DisplayServerLogs option and always turn on "logging" (remember that only error-level output comes out of this process)

Copy link
Contributor

Choose a reason for hiding this comment

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

No, we still need the option to keep the old behavior for other projects (k3s, rke2). Steve, Rancher and webhook will turn it on by default (eg: DisplayServerLogs: true) but the other projects won't (or they might, but we don't decide this).

@ericpromislow ericpromislow force-pushed the 46956-bump-dynamic-listener branch from bc0a9b1 to 69906c5 Compare September 5, 2024 19:01
@ericpromislow ericpromislow requested review from tomleb and a team September 5, 2024 19:01
Copy link
Contributor

@tomleb tomleb left a comment

Choose a reason for hiding this comment

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

LGTM

@ericpromislow ericpromislow merged commit eb6026e into rancher:main Sep 5, 2024
1 check passed
@ericpromislow ericpromislow deleted the 46956-bump-dynamic-listener branch September 5, 2024 22:31
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