Use lazy logging format#5398
Merged
AlexandreYang merged 40 commits intomasterfrom Jan 7, 2020
Merged
Conversation
Codecov Report
|
Codecov Report
|
894abb5 to
7f54c7d
Compare
AlexandreYang
commented
Jan 6, 2020
| ) | ||
| '`collect_status_metrics_by_host` is enabled but no host info could be extracted from HAProxy ' | ||
| 'stats endpoint for %s', | ||
| service, |
Member
Author
There was a problem hiding this comment.
Note: service service was unassigned at this point. That's why service, _, status = host_status has been moved upward.
| if max_slow_entries > DEFAULT_MAX_SLOW_ENTRIES: | ||
| self.warning( | ||
| "Redis {0} is higher than {1}. Defaulting to {1}. " | ||
| "Redis {0} is higher than {1}. Defaulting to {1}. " # noqa: G001 |
Member
Author
There was a problem hiding this comment.
Note: this case is somewhat legit, hence noqa
| err_code, message = e.args | ||
| if err_code == socket.EAI_NODATA or err_code == socket.EAI_NONAME: | ||
| raise socket.error('Unable to resolve host, check your DNS: {}'.format(message)) | ||
| raise socket.error('Unable to resolve host, check your DNS: {}'.format(message)) # noqa: G |
Member
Author
There was a problem hiding this comment.
Note: seems to be a bug in linter, not sure why it's catching this case (will have a look at the plugin code later)
ofek
approved these changes
Jan 7, 2020
florimondmanca
approved these changes
Jan 7, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Use lazy logging format for ALL integrations in
integrations-core.Will enforce the rule in another PR.
ddevis used for integrations extras/internal, so, we need to fix them too, should be faster though since there is less code.CI results with logging linter enabled: #5400 (
PR Allis green)Motivation
Better logging.
Additional Notes
Review checklist (to be filled by reviewers)
changelog/andintegration/labels attached