This is an automated email from the ASF dual-hosted git repository. liubao pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git
The following commit(s) were added to refs/heads/master by this push: new d4ed334 [SCB-1816] print the instance endpoints in the end of the start up log d4ed334 is described below commit d4ed33475df5d6c26182d4f5d95abeeb9628321a Author: yhs0092 <yhs0...@163.com> AuthorDate: Mon Mar 23 22:18:22 2020 +0800 [SCB-1816] print the instance endpoints in the end of the start up log --- .../servicecomb/core/bootup/ServiceInformationCollector.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/apache/servicecomb/core/bootup/ServiceInformationCollector.java b/core/src/main/java/org/apache/servicecomb/core/bootup/ServiceInformationCollector.java index d299b92..78e05b7 100644 --- a/core/src/main/java/org/apache/servicecomb/core/bootup/ServiceInformationCollector.java +++ b/core/src/main/java/org/apache/servicecomb/core/bootup/ServiceInformationCollector.java @@ -19,8 +19,9 @@ package org.apache.servicecomb.core.bootup; import org.apache.servicecomb.serviceregistry.RegistryUtils; -public class ServiceInformationCollector implements BootUpInformationCollector { +import io.vertx.core.spi.json.JsonCodec; +public class ServiceInformationCollector implements BootUpInformationCollector { @Override public String collect() { @@ -29,7 +30,12 @@ public class ServiceInformationCollector implements BootUpInformationCollector { + "\n" + "Version: " + RegistryUtils.getMicroservice().getVersion() + "\n" + "Environment: " + RegistryUtils.getMicroservice().getEnvironment() + "\n" + "Service ID: " + RegistryUtils.getMicroserviceInstance().getServiceId() - + "\n" + "Instance ID: " + RegistryUtils.getMicroserviceInstance().getInstanceId(); + + "\n" + "Instance ID: " + RegistryUtils.getMicroserviceInstance().getInstanceId() + + "\n" + "Endpoints: " + getEndpoints(); + } + + private String getEndpoints() { + return JsonCodec.INSTANCE.toString(RegistryUtils.getMicroserviceInstance().getEndpoints()); } @Override