Skip to content

Commit

Permalink
Fix locality logging (#10423)
Browse files Browse the repository at this point in the history
The bootstrapping code currently does not log zone and subZone from locality correctly, and only logs region. This commit fixes the logging message format.
  • Loading branch information
halvards committed Aug 1, 2023
1 parent 8121e81 commit 4dc786b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xds/src/main/java/io/grpc/xds/BootstrapperImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ BootstrapInfo bootstrap(Map<String, ?> rawData) throws XdsInitializationExceptio
if (rawLocality.containsKey("sub_zone")) {
subZone = JsonUtil.getString(rawLocality, "sub_zone");
}
logger.log(XdsLogLevel.INFO, "Locality region: {0}, zone: {0}, subZone: {0}",
logger.log(XdsLogLevel.INFO, "Locality region: {0}, zone: {1}, subZone: {2}",
region, zone, subZone);
Locality locality = Locality.create(region, zone, subZone);
nodeBuilder.setLocality(locality);
Expand Down

0 comments on commit 4dc786b

Please sign in to comment.