You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/03/23 14:23:17 UTC

[GitHub] [servicecomb-java-chassis] yhs0092 opened a new pull request #1658: [SCB-1816] print the instance endpoints in the end of the start up log

yhs0092 opened a new pull request #1658: [SCB-1816] print the instance endpoints in the end of the start up log
URL: https://github.com/apache/servicecomb-java-chassis/pull/1658
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 merged pull request #1658: [SCB-1816] print the instance endpoints in the end of the start up log

Posted by GitBox <gi...@apache.org>.
liubao68 merged pull request #1658: [SCB-1816] print the instance endpoints in the end of the start up log
URL: https://github.com/apache/servicecomb-java-chassis/pull/1658
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] yhs0092 commented on a change in pull request #1658: [SCB-1816] print the instance endpoints in the end of the start up log

Posted by GitBox <gi...@apache.org>.
yhs0092 commented on a change in pull request #1658: [SCB-1816] print the instance endpoints in the end of the start up log
URL: https://github.com/apache/servicecomb-java-chassis/pull/1658#discussion_r396501315
 
 

 ##########
 File path: core/src/main/java/org/apache/servicecomb/core/bootup/ServiceInformationCollector.java
 ##########
 @@ -29,7 +31,16 @@ public String collect() {
         + "\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() {
+    try {
+      return JsonUtils.writeValueAsString(RegistryUtils.getMicroserviceInstance().getEndpoints());
 
 Review comment:
   Done, please review it

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] wujimin commented on a change in pull request #1658: [SCB-1816] print the instance endpoints in the end of the start up log

Posted by GitBox <gi...@apache.org>.
wujimin commented on a change in pull request #1658: [SCB-1816] print the instance endpoints in the end of the start up log
URL: https://github.com/apache/servicecomb-java-chassis/pull/1658#discussion_r396494731
 
 

 ##########
 File path: core/src/main/java/org/apache/servicecomb/core/bootup/ServiceInformationCollector.java
 ##########
 @@ -29,7 +31,16 @@ public String collect() {
         + "\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() {
+    try {
+      return JsonUtils.writeValueAsString(RegistryUtils.getMicroserviceInstance().getEndpoints());
 
 Review comment:
   换成io.vertx.core.spi.json.JsonCodec#toString(java.lang.Object),就不用自己写了

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services