fu-cheng1 commented on code in PR #15604:
URL: https://github.com/apache/dubbo/pull/15604#discussion_r2248128215


##########
dubbo-common/src/main/java/org/apache/dubbo/common/logger/support/FailsafeLogger.java:
##########
@@ -47,8 +46,7 @@ public void setLogger(Logger logger) {
     }
 
     private String appendContextMessage(String msg) {
-        return " [DUBBO] " + msg + ", dubbo version: " + Version.getVersion() 
+ ", current host: "
-                + NetUtils.getLocalHost();
+        return " [DUBBO] " + msg + ", dubbo version: " + Version.getVersion();

Review Comment:
   However, if the printing of this host information is not removed, it will 
cause premature caching of the network interface card (NIC) that should be used 
in `WelcomeLogoApplicationListener`. The execution timing of 
`WelcomeLogoApplicationListener` may occur *before* Spring loads the 
configuration files, resulting in the NIC configuration specified in the 
configuration files failing to take effect in `NetUtils`.
   
   Therefore, if host information logging is mandatory:  
   1. Could the execution of `WelcomeLogoApplicationListener` be deferred?  
   2. Alternatively, would it be acceptable to omit logging the host 
information?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to