beiwei30 closed pull request #1572: remove the method with the same function 
but the different name in Ne…
URL: https://github.com/apache/incubator-dubbo/pull/1572
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/support/FailsafeLogger.java
 
b/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/support/FailsafeLogger.java
index 858a4e085f..b964693906 100644
--- 
a/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/support/FailsafeLogger.java
+++ 
b/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/support/FailsafeLogger.java
@@ -37,7 +37,7 @@ public void setLogger(Logger logger) {
     }
 
     private String appendContextMessage(String msg) {
-        return " [DUBBO] " + msg + ", dubbo version: " + Version.getVersion() 
+ ", current host: " + NetUtils.getLogHost();
+        return " [DUBBO] " + msg + ", dubbo version: " + Version.getVersion() 
+ ", current host: " + NetUtils.getLocalHost();
     }
 
     public void trace(String msg, Throwable e) {
diff --git 
a/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java 
b/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java
index 5295831632..ee79de4279 100644
--- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java
@@ -182,11 +182,6 @@ public static InetAddress getLocalAddress() {
         return localAddress;
     }
 
-    public static String getLogHost() {
-        InetAddress address = getLocalAddress();
-        return address == null ? LOCALHOST : address.getHostAddress();
-    }
-
     private static InetAddress getLocalAddress0() {
         InetAddress localAddress = null;
         try {


 

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


With regards,
Apache Git Services

Reply via email to