-
Notifications
You must be signed in to change notification settings - Fork 33
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
Create-Plugin: Backend template: Switch from Info to Debug level #146
Conversation
log.DefaultLogger.Info("QueryData called", "request", req) | ||
// when logging at a non-Debug level, make sure you don't include sensitive information in the message | ||
// (like the *backend.QueryDataRequest) | ||
log.DefaultLogger.Debug("QueryData called", "request", req) |
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.
In this case I'd remove the *backend.QueryDataRequest
param completely just in case people don't think to read the comment, don't understand it or just blindly delete it 🙈
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.
Like this?
log.DefaultLogger.Debug("QueryData called", "request", req) | |
log.DefaultLogger.Debug("QueryData called") |
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.
Yeah I think that should be fine! You could also add something like:
log.DefaultLogger.Debug("QueryData called", "numQueries", len(req.Queries))
to demonstrate how to pass key values to the log. Totally up to you 😄
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.
Good point! I think demonstrating how to pass key/value to the log is valuable 👍 👍
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.
👏
🚀 PR was released in |
What this PR does / why we need it:
Info
toDebug
Info
levelWhich issue(s) this PR fixes:
Fixes #140
Special notes for your reviewer: