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
merged 1 commit into from
Apr 15, 2020

Conversation

danielbprice
Copy link
Contributor

Fixes #702.

@danielbprice
Copy link
Contributor Author

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.

@codecov
Copy link

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 April 1, 2020 05:10
Copy link
Collaborator

@prashantv prashantv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 April 3, 2020 03:15
@abhinav
Copy link
Collaborator

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
@danielbprice
Copy link
Contributor Author

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

Copy link
Collaborator

@prashantv prashantv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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.

Would like negative version of AddCaller
3 participants