Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add methods for logging with level as argument #1406

Merged
merged 1 commit into from Feb 13, 2024
Merged

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.

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
8 checks passed
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.

None yet

3 participants