-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add structure logging to Vitess #11960
Conversation
Signed-off-by: Emad Habib <ehabib@slack-corp.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Emad Habib <ehabib@slack-corp.com>
Signed-off-by: Emad Habib <ehabib@slack-corp.com>
Signed-off-by: Emad Habib <ehabib@slack-corp.com>
Signed-off-by: Emad Habib <ehabib@slack-corp.com>
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.
otherwise looks good to me
Signed-off-by: Emad Habib <ehabib@slack-corp.com>
Signed-off-by: Emad Habib <ehabib@slack-corp.com>
I applied all your comments |
Signed-off-by: Emad Habib <ehabib@slack-corp.com>
Looks like |
Signed-off-by: Emad Habib <ehabib@slack-corp.com>
Signed-off-by: Emad Habib <ehabib@slack-corp.com>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
* Create a function to replace glog with PlanetScale log Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Add test case for replacing glog Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Remove one test Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Add flag for PS Logger usage Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Update the usage test files and replace _ with - for the flag Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Apply code review comments Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Add copyrights and release notes Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Update the year in the copyrights Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Fix typo Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Empty Commit Signed-off-by: Emad Habib <ehabib@slack-corp.com> Signed-off-by: Emad Habib <ehabib@slack-corp.com>
… (#270) * Add structure logging to Vitess (vitessio#11960) * Create a function to replace glog with PlanetScale log Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Add test case for replacing glog Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Remove one test Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Add flag for PS Logger usage Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Update the usage test files and replace _ with - for the flag Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Apply code review comments Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Add copyrights and release notes Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Update the year in the copyrights Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Fix typo Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Empty Commit Signed-off-by: Emad Habib <ehabib@slack-corp.com> Signed-off-by: Emad Habib <ehabib@slack-corp.com> * github.com/planetscale/log v0.0.0-20221118170849-fb599bc35c50 Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * go mod tidy after rebase Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> --------- Signed-off-by: Emad Habib <ehabib@slack-corp.com> Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> Co-authored-by: Emad Mokhtar Elsayed Habib <emad.m.habib@gmail.com>
Description
The goal of this PR is to introduce the structure logging to Vitess. Vitess is using
glog
as logger. So I decided to usenoglog
and create drop-in replacement. I used PlanetScale log to replaceglog
as internally it's zap log.The PR is also introducing a flag
structure_logging
where the user can choose to use structure logging or the default logging. The default value isFalse
so the default is to use the current loggingglog
.Related Issue(s)
#11613
Checklist
Deployment Notes