-
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
Feature Request: Replace glog with Zap logger #11613
Comments
In case the proposal approved, I can start working on this feature. |
@EmadMokhtar ,thanks for reporting this and offering to work on it. We are going to discuss it internally and hope to get back to you in a week or two. |
Related: #11614 |
Thanks for the comment. I'll do my research on what is the memory friendly logger in Go. |
Related: https://github.com/planetscale/log |
|
Planetscale's log is a wrapper for zap, @EmadMokhtar. Coupled with noglog, it can make for an easy migration path, I think. |
@EmadMokhtar @ejortegau, just repeating here what Deepthi said in Vitess Slack: we all think it is a good idea to get this done now. Thanks for this initiative. It will be good if you can implement this in parts. Since this change will impact a lot of code, doing this in multiple PRs will help get any review feedback earlier in the cycle. We can also start merging and testing sooner in You can take a call on what works best: using PlanetScale's log or some other approach and share it on this issue with your thoughts/decisions. |
After the merge of #11960 the next step is to make the structure logging as the default logging in Vitess. This will help us in deprecating the Risks
|
I know it's a bit late, but I think we should at this point also seriously consider https://pkg.go.dev/golang.org/x/exp/slog. Afaik it's aimed to be part of the standard library in the future as well with the goal of having something more standardized across different Go projects. We might want to change the PlanetScale logger then to wrap |
Feature Description
Overview
Vitess is using
glog
as its logger.glog
package isn't under development "as stated in the README" plus its original version is maintained by Google, and it's a closed-source.Motivation
Unmaintained package
Replacing an unmaintained package with one is maintained and well-known in the
golang
community.glog
zap
Faster logger
Plus point (which is a marketing point) zap logger is blazingly fast 😉
Verbosity flag
One of my colleague is working on a feature that needs to import
vitess
libraries. He's building a CLI where-v
flag is needed. He stumbled across a problem because theglog
package already defines the-v
flag. So he can't importVitess
libs and define-v
flag.Use Case(s)
suggered
logger for development andunsugered
logger for production. Suggered logger i s better for debugging, and it has better readability.-v
flag collision.The text was updated successfully, but these errors were encountered: