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

feat(discovery): provide an option to disable discovery debug log #1942

Merged
merged 3 commits into from Apr 22, 2022

Conversation

yeqown
Copy link
Contributor

@yeqown yeqown commented Apr 20, 2022

Description (what this PR does / why we need it):

Issue resolved

Which issue(s) this PR fixes (resolves / be part of):

fixes #1935

Other special notes for reviewer:

@yeqown yeqown force-pushed the feature/log-disable-option branch from 3dbd055 to ef02909 Compare April 20, 2022 03:52
@daemon365
Copy link
Member

What's this for? Do not output resolver log?

@codecov-commenter
Copy link

codecov-commenter commented Apr 20, 2022

Codecov Report

Merging #1942 (77b4959) into main (d0b704b) will decrease coverage by 0.05%.
The diff coverage is 83.33%.

❗ Current head 77b4959 differs from pull request most recent head 34bb27f. Consider uploading reports for the commit 34bb27f to get more accurate results

@@            Coverage Diff             @@
##             main    #1942      +/-   ##
==========================================
- Coverage   80.71%   80.66%   -0.06%     
==========================================
  Files          81       81              
  Lines        3609     3615       +6     
==========================================
+ Hits         2913     2916       +3     
- Misses        489      492       +3     
  Partials      207      207              
Impacted Files Coverage Δ
transport/grpc/resolver/discovery/builder.go 80.76% <80.00%> (-4.34%) ⬇️
transport/grpc/resolver/discovery/resolver.go 76.78% <100.00%> (+0.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0b704b...34bb27f. Read the comment docs.

@yeqown
Copy link
Contributor Author

yeqown commented Apr 20, 2022

@haiyux provide an option to disable "[resolve] update instance xxx" log which is abundant and intrusive for someone and it's unstoppable now.

@Casper-Mars
Copy link
Contributor

How about passing a no-output logger ? I think this is more elegant.

@yeqown
Copy link
Contributor Author

yeqown commented Apr 22, 2022

How about passing a no-output logger ? I think this is more elegant.

you can‘t even know whether the discoveryResolver started or not.

@tonybase tonybase merged commit fbf7855 into go-kratos:main Apr 22, 2022
tonybase pushed a commit that referenced this pull request May 31, 2022
)

* feat(discovery): provide an option to disable discovery resolver one debug-like log

* styl: re-sort imports

* styl: rename option function name and comment
@freezeChen
Copy link
Contributor

新提供的方法DisableDebugLog()隐藏在grpc client DialInsecure()方法的内部,外部并没办法对discovery.NewBuilder()进行参数设置, 建议在 grpc client DialInsecure()的options中添加 debuglog的开关,传递至discovery.NewBuilder内部

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.

求助,怎么能关闭这个 info 日志?
6 participants