-
Notifications
You must be signed in to change notification settings - Fork 26
fix(clients): Update log line too long message
#611
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
fix(clients): Update log line too long message
#611
Conversation
⏱️ Benchmark resultsComparing with 38b136b
|
yevgenypats
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit on logs.
| } | ||
| 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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
| p.logger = logger.With().Str("module", p.name+"-src").Logger() |
48f9b40 to
e6de91d
Compare
🤖 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).
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)