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 WithCaller(), a generalized AddCaller() #806

merged 1 commit into from Apr 15, 2020


Copy link

@danielbprice danielbprice commented Mar 26, 2020

Fixes #702.

Copy link
Contributor Author

@danielbprice danielbprice commented Mar 26, 2020

FWiW I am not attached to the name SetCaller(); just give me feedback and I'll tweak it ASAP. This issue has cropped up for me several times, so i am eager to fix it.

Copy link

@codecov codecov bot commented Mar 26, 2020

Codecov Report

Merging #806 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #806   +/-   ##
  Coverage   98.31%   98.31%           
  Files          43       43           
  Lines        2311     2317    +6     
+ Hits         2272     2278    +6     
  Misses         32       32           
  Partials        7        7           
Impacted Files Coverage Δ
options.go 100.00% <100.00%> (ø)
field.go 100.00% <0.00%> (ø)
zapcore/field.go 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f994215...1661db9. Read the comment docs.

@prashantv prashantv requested a review from abhinav Apr 1, 2020
Copy link

@prashantv prashantv left a comment

Change looks good, I'm not so sure about the name either. I think @abhinav had a preference for AddCallerDisable, but that would always be a negative version. Another alternative, EnableCaller(bool)

Neither is great, @abhinav -- what do you think?

logger_test.go Outdated Show resolved Hide resolved
@danielbprice danielbprice force-pushed the master branch 2 times, most recently from 1edff8b to 49db921 Compare Apr 3, 2020
Copy link

@abhinav abhinav commented Apr 10, 2020

How about WithCaller(bool)? That suggests inclusion of the caller with the other fields versus "SetCaller" which suggests you're setting the caller.

@danielbprice danielbprice changed the title Add SetCaller, a generalized AddCaller() Add WithCaller(), a generalized AddCaller() Apr 11, 2020
Copy link
Contributor Author

@danielbprice danielbprice commented Apr 11, 2020

Cool! AFAICT there is nothing left for me to do. But if I've missed something please let me know.

Copy link

@prashantv prashantv left a comment

Thanks for the contribution, we'll merge it in, and do a release soon.

@prashantv prashantv merged commit b2382d7 into uber-go:master Apr 15, 2020
4 checks passed
uvfive pushed a commit to bxsmart/zap that referenced this issue May 21, 2020
cgxxv pushed a commit to cgxxv/zap that referenced this issue Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

3 participants