Skip to content

Commit cd770f8

Browse files
committed
Fix number of arguments in logging statement
Fixes #978
1 parent 6d98be4 commit cd770f8

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

spring-cloud-consul-discovery/src/main/java/org/springframework/cloud/consul/serviceregistry/ConsulServiceRegistry.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,14 @@ public void setStatus(ConsulRegistration registration, String status) {
100100
if (status.equalsIgnoreCase(OUT_OF_SERVICE.getCode())) {
101101
ResponseEntity<Void> response = this.client.agentServiceSetMaintenance(registration.getInstanceId(), true,
102102
null, this.properties.getAclToken());
103-
log.debug(LogMessage.format(
104-
"Set status for service with consul: %s, status %s, response %s" + registration.getInstanceId(),
105-
status, response));
103+
log.debug(LogMessage.format("Set status for service with consul: %s, status %s, response %s",
104+
registration.getInstanceId(), status, response));
106105
}
107106
else if (status.equalsIgnoreCase(UP.getCode())) {
108107
ResponseEntity<Void> response = this.client.agentServiceSetMaintenance(registration.getInstanceId(), false,
109108
null, this.properties.getAclToken());
110-
log.debug(LogMessage.format(
111-
"Set status for service with consul: %s, status %s, response %s" + registration.getInstanceId(),
112-
status, response));
109+
log.debug(LogMessage.format("Set status for service with consul: %s, status %s, response %s",
110+
registration.getInstanceId(), status, response));
113111
}
114112
else {
115113
throw new IllegalArgumentException("Unknown status: " + status);

0 commit comments

Comments
 (0)