Skip to content

Conversation

@arxeiss
Copy link
Contributor

@arxeiss arxeiss commented Jan 29, 2024

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

@CLAassistant
Copy link

CLAassistant commented Jan 29, 2024

CLA assistant check
All committers have signed the CLA.

@tchung1118 tchung1118 requested a review from sywhang January 30, 2024 19:11
@codecov
Copy link

codecov bot commented Feb 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (70f61bb) 98.42% compared to head (24ebbfd) 98.42%.
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1406   +/-   ##
=======================================
  Coverage   98.42%   98.42%           
=======================================
  Files          53       53           
  Lines        3495     3503    +8     
=======================================
+ Hits         3440     3448    +8     
  Misses         46       46           
  Partials        9        9           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@r-hang r-hang changed the title Add generic methods for logging with level as argument Add methods for logging with level as argument Feb 13, 2024
@r-hang r-hang merged commit 956a21c into uber-go:master Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants