forked from golang/glog
-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
klogr: add support for structured logging via klog
Now that klog has support for structured logging, it makes sense to use that also through klogr. The log output without a structured logger becomes more readable and key/value semantic is not lost anymore with a structured logger. However, revising the output handling is a breaking change for those who depend on the traditional output. Therefore this is implemented in a backward compatible way: - code calling New() without parameters continues to work and gets the traditional behavior - deferring the complete output handling to klog is enabled via a functional option
- Loading branch information
Showing
3 changed files
with
163 additions
and
42 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