org.apache.log4j.net.SocketServer method: LoggerRepository configureHierarchy(InetAddress inetAddress) { cat.info("Locating configuration file for " + inetAddress); // We assume that the toSting method of InetAddress returns is in // the format hostname/d1.d2.d3.d4 e.g. torino/192.168.1.1 String s = inetAddress.toString(); int i = s.indexOf("/"); if (i == -1) { ... } else { /*****************************/ /**if my inetAddress.toString()="/192.168.1.1"; key = ""; */ String key = s.substring(0, i); //Filename = ".lcf",but has no name. /*****************************/ File configFile = new File(dir, key + CONFIG_FILE_EXT); }
Created attachment 18804 [details] Uses InetAddress.getHostName() instead of parsing InetAddress.toString()
The assumption of a format for InetAddress.toString() and parsing I assume is the problem. I've changed the name of the bug report to reflect my understanding of the problem you've reported. I've also attached a patch, could you review and see if it addresses the problem that you are encountering. If not, please attach a patch that does or describe the problem more fully and your desired resolution.