-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parser: drop hard dependency on glog
All calls go through a logger in the config. The logger may be nil, so we check that it's non-nil everywhere. We also keep the behavior in cmd/txtpbfmt unchanged. Calls to Errorf still end up going to glog.Errorf, and calls to Infof still end up going to glog.V(2).Infof. Note that the library used the boolean value of glog.V(2) to tell whether the "info" log level was enabled or not. When disabled, this allowed us to not compute some log arguments, such as calls to strings.Join or string copies. Since we can't assume an interface to be of boolean type, add an extra InfoLevel method to perform the same duty. Fixes #70.
- Loading branch information
Showing
3 changed files
with
74 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters