-
Notifications
You must be signed in to change notification settings - Fork 806
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
use unified root logger for fx dependency-injection in chaos-controller-manager #2808
use unified root logger for fx dependency-injection in chaos-controller-manager #2808
Conversation
Signed-off-by: STRRL <str_ruiling@outlook.com>
Signed-off-by: STRRL <str_ruiling@outlook.com>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Signed-off-by: STRRL <str_ruiling@outlook.com>
Codecov Report
@@ Coverage Diff @@
## master #2808 +/- ##
==========================================
- Coverage 40.96% 40.94% -0.02%
==========================================
Files 147 147
Lines 11985 11983 -2
==========================================
- Hits 4910 4907 -3
- Misses 6705 6708 +3
+ Partials 370 368 -2
Continue to review full report at Codecov.
|
Signed-off-by: STRRL <str_ruiling@outlook.com>
Signed-off-by: STRRL <str_ruiling@outlook.com>
Signed-off-by: STRRL <str_ruiling@outlook.com>
PTAL |
pkg/log/global_logger.go
Outdated
return result | ||
} | ||
|
||
// ReplaceGlobals would replace the global logger with the given logger. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some comments about this function should only be called when application starting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about "should be called when application starting" ?🤔 I think this restriction ("should only be") is not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with you :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, PTAL!
Signed-off-by: STRRL <str_ruiling@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Need example in future.
/merge |
This pull request has been accepted and is ready to merge. Commit hash: f87e4d7
|
/merge |
Signed-off-by: STRRL <str_ruiling@outlook.com>
/merge |
This pull request has been accepted and is ready to merge. Commit hash: a5c36ae
|
cherry pick to release-2.1 failed |
I would manually cherry pick it. |
…er-manager (chaos-mesh#2808) * chore: package for logger Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: fix dependency injection Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: update comments for global logger L Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: use standard log instead of fmt.Print Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: configure logger for fx Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: update comments for ReplaceGlobals Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
* use unified root logger for fx dependency-injection in chaos-controller-manager (#2808) * chore: package for logger Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: fix dependency injection Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: update comments for global logger L Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: use standard log instead of fmt.Print Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: configure logger for fx Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: update comments for ReplaceGlobals Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
* use unified root logger for fx dependency-injection in chaos-controller-manager (chaos-mesh#2808) * chore: package for logger Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: fix dependency injection Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: update comments for global logger L Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: use standard log instead of fmt.Print Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: configure logger for fx Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: update comments for ReplaceGlobals Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> Signed-off-by: STRRL <str_ruiling@outlook.com>
* cherry-pick logging updates into release-2.1 (#2970) * use unified root logger for fx dependency-injection in chaos-controller-manager (#2808) * chore: package for logger Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: fix dependency injection Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: update comments for global logger L Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: use standard log instead of fmt.Print Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: configure logger for fx Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: update comments for ReplaceGlobals Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> Signed-off-by: STRRL <str_ruiling@outlook.com> * log: add customized logger for daemon and bpm (#2902) * add customized logger for daemon and bpm Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * extract the grpc metadata into the context Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * make check Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * make check Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * remove log parameter in killIOChaos Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * add logs Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * remove log parameter in httpchaos server Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * add the context comments for process builder Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * make check Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * use the logger in arguments Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * add back boilerplate Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * fix make check Signed-off-by: YangKeao <yangkeao@chunibyo.icu> Signed-off-by: STRRL <str_ruiling@outlook.com> * remove unused logger in ProcessBuilder Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: update changelog Signed-off-by: STRRL <str_ruiling@outlook.com> * retrigger lift Signed-off-by: STRRL <str_ruiling@outlook.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> Co-authored-by: YangKeao <yangkeao@chunibyo.icu>
…er-manager (chaos-mesh#2808) * chore: package for logger Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: fix dependency injection Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: update comments for global logger L Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: use standard log instead of fmt.Print Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: configure logger for fx Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: update comments for ReplaceGlobals Signed-off-by: STRRL <str_ruiling@outlook.com> * chore: make check Signed-off-by: STRRL <str_ruiling@outlook.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> Signed-off-by: zhqqqy <zhqqqy@163.com>
What problem does this PR solve?
It's a part of #2752.
What's changed and how it works?
logr.Logger
for both controller-runtime and fxRelated changes
chaos-mesh/website
Dashboard UI
Checklist
Tests
Side effects
Release note
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: