Here you can find the source of getLogHost()
public static String getLogHost()
//package com.java2s; //License from project: Apache License import java.net.*; public class Main { public static final String LOCALHOST = "127.0.0.1"; private static volatile InetAddress LOCAL_ADDRESS = null; public static String getLogHost() { InetAddress address = LOCAL_ADDRESS; return address == null ? LOCALHOST : address.getHostAddress(); }// w w w .ja v a 2 s . c o m }