fix(clients): Update log line too long message#611
Merged
kodiakhq[bot] merged 2 commits intocloudquery:mainfrom Jan 18, 2023
Merged
fix(clients): Update log line too long message#611kodiakhq[bot] merged 2 commits intocloudquery:mainfrom
log line too long message#611kodiakhq[bot] merged 2 commits intocloudquery:mainfrom
Conversation
⏱️ Benchmark resultsComparing with 38b136b
|
hermanschaaf
approved these changes
Jan 17, 2023
yevgenypats
reviewed
Jan 17, 2023
| } | ||
| if errors.Is(err, errLogLineToLong) { | ||
| c.logger.Err(err).Str("line", string(line)).Msg("skipping too long log line") | ||
| c.logger.Info().Str("line", string(line)).Msg("truncated source plugin log line") |
Contributor
There was a problem hiding this comment.
I wonder if the word source plugin is needed. our logger has context so it is contexted with the source plugin name and all other properties.
Member
Author
There was a problem hiding this comment.
This logging happens in the context of the CLI logger so module=cli.
It comes from https://github.com/cloudquery/cloudquery/blob/9f33362ebc9989ca0f6f74eac9e5700657a18116/cli/cmd/sync.go#L79
You might be referring to the plugin logger that is created here
plugin-sdk/plugins/source/plugin.go
Line 153 in 448232c
48f9b40 to
e6de91d
Compare
yevgenypats
approved these changes
Jan 18, 2023
kodiakhq bot
pushed a commit
that referenced
this pull request
Jan 23, 2023
🤖 I have created a release *beep* *boop* --- ## [1.28.0](v1.27.0...v1.28.0) (2023-01-23) ### Features * Add version discovery service ([#619](#619)) ([33ab32a](33ab32a)) * Dynamic tables and introduce proto versioning ([#610](#610)) ([448232c](448232c)) ### Bug Fixes * **clients:** Update `log line too long` message ([#611](#611)) ([0d3ff48](0d3ff48)) * Simplify client naming conventions ([#617](#617)) ([38b136b](38b136b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Summary
Fixes cloudquery/cloudquery#5665, by making this log message look less like an error.
I could go with
Warntoo and maybe update the level of the other errors here (but won't do it unless someone finds those confusing).The current message can cause users to think that there is data loss or something wrong with the sync
Use the following steps to ensure your PR is ready to be reviewed
go fmtto format your code 🖊golangci-lint run🚨 (install golangci-lint here)