Skip to content

Commit

Permalink
Minor logging tweaks
Browse files Browse the repository at this point in the history
This change makes UnicastHeader/3 toString() consistent with most other headers by wrapping in "[]"
- And changes two logs for new UNICAST4/NAKACK4 to debug to not be logged by default

- Removed formatting ('[', ']') around headers
  • Loading branch information
cfredri4 authored and belaban committed Nov 18, 2024
1 parent c5c3881 commit d774cc0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/org/jgroups/protocols/NAKACK4.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void init() throws Exception {
super.init();
if(ack_threshold <= 0) {
ack_threshold=capacity / 4;
log.info("defaulted ack_threshold to %d", ack_threshold);
log.debug("defaulted ack_threshold to %d", ack_threshold);
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/org/jgroups/protocols/NakAckHeader.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public static String type2Str(byte t) {

public String toString() {
StringBuilder ret=new StringBuilder();
ret.append("[").append(type2Str(type));
ret.append(type2Str(type));
switch(type) {
case MSG:
case XMIT_RSP: // seqno and sender
Expand All @@ -157,7 +157,6 @@ public String toString() {
}

if(sender != null) ret.append(", sender=").append(sender);
ret.append(']');
return ret.toString();
}

Expand Down
2 changes: 1 addition & 1 deletion src/org/jgroups/protocols/UNICAST4.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void init() throws Exception {
super.init();
if(ack_threshold <= 0) {
ack_threshold=capacity / 4;
log.info("defaulted ack_threshold to %d", ack_threshold);
log.debug("defaulted ack_threshold to %d", ack_threshold);
}
}

Expand Down

0 comments on commit d774cc0

Please sign in to comment.