uber-go / fx

A dependency injection based application framework for Go.
https://uber-go.github.io/fx/
MIT License
5.72k stars 289 forks source link

feat: added slog adapter #1173

Closed robbert229 closed 6 months ago

robbert229 commented 6 months ago

Unsure if this is even wanted however, this PR introduces an adapter (originally from here) to more easily use slog as the underlying logger implementation instead of zap.

This covers: #1170

CLAassistant commented 6 months ago

CLA assistant check
All committers have signed the CLA.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 99.01478% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 98.73%. Comparing base (bb632be) to head (9475fc1).

Files Patch % Lines
fxevent/slog.go 99.01% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1173 +/- ## ========================================== + Coverage 98.71% 98.73% +0.02% ========================================== Files 30 31 +1 Lines 2648 2851 +203 ========================================== + Hits 2614 2815 +201 - Misses 27 29 +2 Partials 7 7 ```

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