org.apache.logging.log4j.core.util
Class NetUtils
java.lang.Object
org.apache.logging.log4j.core.util.NetUtils
public final class NetUtils
- extends Object
Method Summary |
static String |
getLocalHostname()
This method gets the network name of the machine we are running on. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getLocalHostname
public static String getLocalHostname()
- This method gets the network name of the machine we are running on.
Returns "UNKNOWN_LOCALHOST" in the unlikely case where the host name
cannot be found.
- Returns:
- String the name of the local host
Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.