uber-go / zap

Blazing fast, structured, leveled logging in Go.
https://pkg.go.dev/go.uber.org/zap
MIT License
22.08k stars 1.44k forks source link

Add `func DictObject` #1460

Closed MayCXC closed 3 months ago

MayCXC commented 3 months ago

Allows fields to be used to construct ObjectMarshalers that can then be used with other functions like func Objects. Link to issue: https://github.com/uber-go/zap/issues/1458

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

abhinav commented 3 months ago

Thanks for the PR, @MayCXC. This change makes sense to me. Would you mind adding some documentation and tests for this?

MayCXC commented 3 months ago

Thanks for the PR, @MayCXC. This change makes sense to me. Would you mind adding some documentation and tests for this?

you got it, I added doc comments & tests.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.70%. Comparing base (3f27eb9) to head (9bd3a78). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1460 +/- ## ======================================= Coverage 98.70% 98.70% ======================================= Files 53 53 Lines 3018 3020 +2 ======================================= + Hits 2979 2981 +2 Misses 31 31 Partials 8 8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.