Allow using planetscale's log instead of glog #19
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.
Description
This can be controlled with a command flag. However, notice that using the planetscale logger means that automatic log rotation does now work, as this is not provided by planetscale's logger or the underlying zap logger, whereas it does come in with glog.
Usual logging continues to work without any changes:
But with the new flag, it changes to planetscale's logger:
Using Planetscale's logger (which under the hood is a wrapper for Uber's zap) together with
noglog
as in this PR allows for an easy migration path away from glog; while also providing an initial approach to structured logging.Notice that to get this upstreamed, a different PR with slightly different code changes is necessary, as the way in which the log related CLI flags are registered is different.
Related issue
vitessio#11613