diff --git a/src/main/java/com/hazelcast/aws/AwsDiscoveryStrategy.java b/src/main/java/com/hazelcast/aws/AwsDiscoveryStrategy.java index 7d146e5..fe0c57d 100644 --- a/src/main/java/com/hazelcast/aws/AwsDiscoveryStrategy.java +++ b/src/main/java/com/hazelcast/aws/AwsDiscoveryStrategy.java @@ -73,6 +73,7 @@ public class AwsDiscoveryStrategy private final Map memberMetadata = new HashMap<>(); private boolean isKnownExceptionAlreadyLogged; + private boolean isEmptyAddressListAlreadyLogged; AwsDiscoveryStrategy(Map properties) { super(LOGGER, properties); @@ -208,9 +209,10 @@ public Iterable discoverNodes() { return Collections.emptyList(); } - private static void logResult(Map addresses) { - if (addresses.isEmpty()) { + private void logResult(Map addresses) { + if (addresses.isEmpty() && !isEmptyAddressListAlreadyLogged) { LOGGER.warning("No IP addresses found! Starting standalone."); + isEmptyAddressListAlreadyLogged = true; } LOGGER.fine(String.format("Found the following (private => public) addresses: %s", addresses));