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 GetField func to get an specific field from logger #16

Merged
merged 1 commit into from Jan 17, 2024

Conversation

yuseferi
Copy link
Owner

@yuseferi yuseferi commented Jan 17, 2024

Adding GetField to retrieve a specific field from the stored fields from the logger.

eg: zax.GetField(ctx, "traceID") this returns traceID zap field from the context . if it does not exist return empty zap.field.

Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (aa57e19) 100.00% compared to head (44ea0a9) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #16   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           12        19    +7     
=========================================
+ Hits            12        19    +7     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@yuseferi yuseferi merged commit 7495cf4 into master Jan 17, 2024
8 checks passed
@yuseferi yuseferi deleted the add-getfield-fucntion branch January 17, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant