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/log/zap: Adding ability to get client-go and trace level logs #1322

Merged

Conversation

shawn-hurley
Copy link
Member

Description of the change:
Adding the ability to set the log level for klog if the zap-level is for enough verbosity.

Motivation for the change:
Allowing users to get more debug level logs with help when diagnosing problems.

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 12, 2019
@shawn-hurley
Copy link
Member Author

/cc @jmrodri @joelanford

Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

LGTM after addressing comments.

Can you also add a line to the CHANGELOG for this change?

cmd/operator-sdk/run/ansible.go Outdated Show resolved Hide resolved
cmd/operator-sdk/up/local.go Outdated Show resolved Hide resolved
@shawn-hurley shawn-hurley force-pushed the feature/add-log-levels branch from ce17a5b to c11d758 Compare April 12, 2019 23:49
Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

Thanks, still LGTM 👍

@jmrodri
Copy link
Member

jmrodri commented Apr 15, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 15, 2019
Copy link
Member

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

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

LGTM

if lvl < -3 {
fs := flag.NewFlagSet("", flag.ContinueOnError)
klog.InitFlags(fs)
fs.Set("v", fmt.Sprintf("%v", -1*lvl))
Copy link
Contributor

Choose a reason for hiding this comment

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

Check the returned error?

Copy link
Member

@estroz estroz left a comment

Choose a reason for hiding this comment

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

/lgtm

@hasbro17
Copy link
Contributor

Also it might be worth adding a line somewhere in the logging user doc to mention this behavior beyond just the CHANGELOG.

@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 15, 2019
@shawn-hurley shawn-hurley merged commit 0c6c063 into operator-framework:master Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants