-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add methods for logging with level as argument (#1406)
Adding generic `Log`, `Logf`, `Logw` and `Logln` methods to Sugared logger. When I need to do a wrapper around Zap logger to pass that into 3rd party library for unifying logging, it might come handy to use zap.Log(level, ...) instead of switch or if-else if chain. However, now I need to do a same wrapper but with Sugared logger. And that doesn't support general Log method. More description in #1405
- Loading branch information
Showing
2 changed files
with
36 additions
and
8 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