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

pkg/logflags: Display warning when unknown component for --log-output #1897

Merged
merged 1 commit into from
Feb 28, 2020

Conversation

chainhelen
Copy link
Contributor

No description provided.

Copy link
Member

@aarzilli aarzilli left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@derekparker derekparker left a comment

Choose a reason for hiding this comment

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

Small changes, otherwise looks great, thanks!

// If adding another value, do make sure to
// update "Help about logging flags" in commands.go.
default:
if !unKnownHasPrint { // Just print first unknown component.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to have this restriction, I don't mind printing a warning for each unknown log item.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have try, it looks ok. I will change and rebase.

// update "Help about logging flags" in commands.go.
default:
if !unKnownHasPrint { // Just print first unknown component.
fmt.Fprintf(os.Stderr, "Warning: unknown %q for '--log-output', run 'dlv help log' for usage.\n", logcmd)
Copy link
Member

Choose a reason for hiding this comment

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

nit: Warning: unknown log output value %s for ...

Copy link
Contributor Author

@chainhelen chainhelen Feb 28, 2020

Choose a reason for hiding this comment

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

I remove for '--log-output' that the same meaning as log output value , avoid too long one line.

Warning: unknown log output value %q, run 'dlv help log' for usage.

@chainhelen
Copy link
Contributor Author

chainhelen commented Feb 28, 2020

I will change and rebase.


Has done and rebase. The second version.

Copy link
Member

@derekparker derekparker left a comment

Choose a reason for hiding this comment

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

LGTM

@derekparker derekparker merged commit 0a650a0 into go-delve:master Feb 28, 2020
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