mirror of https://github.com/grpc/grpc-java.git
Fix locality logging (#10423)
The bootstrapping code currently does not log zone and subZone from locality correctly, and only logs region. This commit fixes the logging message format.
This commit is contained in:
parent
8121e8118e
commit
4dc786b5be
|
|
@ -169,7 +169,7 @@ class BootstrapperImpl extends Bootstrapper {
|
||||||
if (rawLocality.containsKey("sub_zone")) {
|
if (rawLocality.containsKey("sub_zone")) {
|
||||||
subZone = JsonUtil.getString(rawLocality, "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);
|
region, zone, subZone);
|
||||||
Locality locality = Locality.create(region, zone, subZone);
|
Locality locality = Locality.create(region, zone, subZone);
|
||||||
nodeBuilder.setLocality(locality);
|
nodeBuilder.setLocality(locality);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue