-
Notifications
You must be signed in to change notification settings - Fork 817
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
chore: upgrade fx event logger #4036
chore: upgrade fx event logger #4036
Conversation
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #4036 +/- ##
==========================================
+ Coverage 38.61% 38.69% +0.08%
==========================================
Files 167 167
Lines 13734 13734
==========================================
+ Hits 5303 5314 +11
+ Misses 7996 7989 -7
+ Partials 435 431 -4 see 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
basically LGTM, but I am not sure about creating a new module as a new standalone GitHub Repository (I mean https://github.com/chaos-mesh/fx-logr) with pseudo-version in go.mod What about
What do you think about it? @g1eny0ung |
@STRRL Makes sense. Yes, I forgot to tag a release version to it. I will tag it now. As for why I created a standalone repo, it's because I think it's a generic adapter, not related to Chaos Mesh. |
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: STRRL The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
What's changed and how it works?
After Fx
v1.14.0
, there is a new method (fx.WithLogger
) to add a custom logger to log Fx's own operations (see https://uber-go.github.io/fx/get-started/logger.html) and the old method is deprecated. We used to use a simplePrintf
wrapper, now I create a logr adapter to seamlessly integrate ourzapr
logger.Related changes
UI interface
Checklist
CHANGELOG
CHANGELOG.md
Tests
Side effects
DCO
If you find the DCO check fails, please run commands like below (Depends on the actual situations. For example, if the failed commit isn't the most recent) to fix it: