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

Add a custom log formatter #1266

Merged
merged 4 commits into from
Jul 10, 2018
Merged

Add a custom log formatter #1266

merged 4 commits into from
Jul 10, 2018

Conversation

bamarni
Copy link
Contributor

@bamarni bamarni commented Jul 8, 2018

It just keeps the log entry message and appends a newline to it. This makes them more user-friendly in the terminal.

Before :

INFO[0000] Log message.

After :

Log message.

https://jira.mesosphere.com/browse/DCOS_OSS-3746

It just keeps the log entry message and appends a newline to it.
This makes them more user-friendly in the terminal.

Before:

    INFO[0000] Log message.

After:

    Log message.

https://jira.mesosphere.com/browse/DCOS_OSS-3746
Only dump requests/responses when the logging level is set to debug.
@bamarni bamarni closed this Jul 9, 2018
@bamarni bamarni reopened this Jul 9, 2018
@bamarni bamarni closed this Jul 9, 2018
@bamarni bamarni reopened this Jul 9, 2018
pkg/cmd/dcos.go Outdated
@@ -19,7 +19,8 @@ const annotationUsageOptions string = "usage_options"
func NewDCOSCommand(ctx api.Context) *cobra.Command {
var verbose int
cmd := &cobra.Command{
Use: "dcos",
Use: "dcos",
SilenceUsage: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this silence the custom usage info that you defined in a different PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was silenced on invalid usage sometimes, adding it in the persistentPreRun hook seems better, cf. spf13/cobra#340

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 also re-added the field in the plugin commands, as it was unrealted and I'm not sure if it'd break things on this side.

br-lewis
br-lewis previously approved these changes Jul 9, 2018
This causes command help messages to appear everytime an error is triggered.
@armandgrillet armandgrillet merged commit 04db5d5 into dcos:master Jul 10, 2018
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