Skip to content

change 'data will be added' from Info to Debug to be less spammy#482

Merged
maxsmythe merged 2 commits into
open-policy-agent:masterfrom
grosser:grosser/debug
Feb 19, 2020
Merged

change 'data will be added' from Info to Debug to be less spammy#482
maxsmythe merged 2 commits into
open-policy-agent:masterfrom
grosser:grosser/debug

Conversation

@grosser
Copy link
Copy Markdown
Contributor

@grosser grosser commented Feb 15, 2020

syncing happens a lot, especially when watching many resources and the constant "data will be added"
spam is only needed when "debugging" sync issues, so change to debug

fixes #399
@maxsmythe

@maxsmythe
Copy link
Copy Markdown
Contributor

LGTM, but needs DCO

@grosser
Copy link
Copy Markdown
Contributor Author

grosser commented Feb 19, 2020

done! :)

Comment thread pkg/controller/sync/sync_controller.go Outdated
}

r.log.Info("data will be added", "data", instance)
r.log.Debug("data will be added", "data", instance)
Copy link
Copy Markdown
Contributor

@maxsmythe maxsmythe Feb 19, 2020

Choose a reason for hiding this comment

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

It looks like .Debug() doesn't exist.

We could add a global constant DebugLevel to pkg/logging/logging.go with the value of 2, then change this to:

r.log.V(logging.DebugLevel).Info(<ORIGNAL ARGS>)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this seems like a really strange logger if basic things like Debug don't exist :(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, unclear to me why it's structured that way, it seems like something that'd be intentional though.

syncing happens a lot, especially when watching many resources and the constant "data will be added"
spam is only needed when "debugging" sync issues, so change to debug

Signed-off-by: Michael Grosser <michael@grosser.it>
@maxsmythe maxsmythe merged commit 5157cbe into open-policy-agent:master Feb 19, 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.

change "data will be added" to debug level

2 participants