-
Notifications
You must be signed in to change notification settings - Fork 12k
[ROCKETMQ-172]log improvement for rocketmq client #90
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
Changes from all commits
633ac28
7909245
c46e4c6
ec7c8cd
1e8b575
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -321,6 +321,7 @@ public void updateNameServerAddressList(List<String> addrs) { | |
|
|
||
| if (update) { | ||
| Collections.shuffle(addrs); | ||
| log.info("name server address updated. NEW : {} , OLD: {}",addrs,old); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NEW, OLD look ugly to me :) ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shroman , but OLD , NEW has been already exists in rocketmq's log. please see ConsumerGroupInfo.java for one sample.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just a suggestion to make it prettier ;)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps we can post another PR for some logging format, currently I would just retain the current way |
||
| this.namesrvAddrList.set(addrs); | ||
| } | ||
| } | ||
|
|
@@ -398,6 +399,7 @@ private Channel getAndCreateNameserverChannel() throws InterruptedException { | |
| String newAddr = addrList.get(index); | ||
|
|
||
| this.namesrvAddrChoosed.set(newAddr); | ||
| log.info("new name server is chosen. OLD: {} , NEW: {}. namesrvIndex = {}", addr, newAddr, namesrvIndex); | ||
| Channel channelNew = this.createChannel(newAddr); | ||
| if (channelNew != null) | ||
| return channelNew; | ||
|
|
||
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.
Please replace {} with +
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.
But this is not a sl4j 's logging, it's a exception, so direct string is needed.