debug log failure to find local host

This commit is contained in:
Shay Banon 2011-08-22 11:02:10 +03:00
parent f4a36a2d87
commit bb9bcf6a1e
2 changed files with 5 additions and 2 deletions

View File

@ -108,7 +108,10 @@ public class NetworkService extends AbstractComponent {
if (address == null) {
address = NetworkUtils.getFirstNonLoopbackAddress(NetworkUtils.getIpStackType());
if (address == null) {
return NetworkUtils.getLocalAddress();
address = NetworkUtils.getLocalAddress();
if (address == null) {
return NetworkUtils.getLocalhost(NetworkUtils.StackType.IPv4);
}
}
}
}

View File

@ -64,7 +64,7 @@ public abstract class NetworkUtils {
try {
localAddressX = InetAddress.getLocalHost();
} catch (UnknownHostException e) {
logger.warn("Failed to find local host", e);
logger.trace("Failed to find local host", e);
}
localAddress = localAddressX;
}