try{Stringmyaddress=InetAddress.getLocalHost().getHostAddress().toString();log.debug("myaddress:\r\n"+myaddress);}catch(UnknownHostExceptionex){log.debug("message:",ex);ex.printStackTrace();}实际测试,是会换行的~~~~~