Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit b311b79

Browse files
authored
Merge pull request #1279 from spotify/dxia/log-master-resolution
Add logging for resolution of helios SRV records
2 parents 61e3e94 + 15b0229 commit b311b79

File tree

1 file changed

+7
-1
lines changed
  • helios-client/src/main/java/com/spotify/helios/common

1 file changed

+7
-1
lines changed

helios-client/src/main/java/com/spotify/helios/common/Resolver.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,17 @@
3131
import java.net.URI;
3232
import java.net.URISyntaxException;
3333
import java.util.List;
34+
import org.slf4j.Logger;
35+
import org.slf4j.LoggerFactory;
3436

3537
/**
3638
* A utility class that resolves DNS SRV records. Used by {@link PeriodicResolver} to discover
3739
* helios masters.
3840
*/
3941
class Resolver {
4042

43+
private static final Logger log = LoggerFactory.getLogger(Resolver.class);
44+
4145
private static final String HTTPS_SRV_FORMAT = env("HELIOS_HTTPS_SRV_FORMAT", "_%s._https.%s");
4246
private static final String HTTP_SRV_FORMAT = env("HELIOS_HTTP_SRV_FORMAT", "_%s._http.%s");
4347

@@ -83,7 +87,9 @@ private static List<URI> resolve(final String srvName,
8387
endpoints.add(protocol(protocol, result.host(), result.port()));
8488
}
8589

86-
return endpoints.build();
90+
final ImmutableList<URI> uris = endpoints.build();
91+
log.info("Resolved {} to {}", name, uris);
92+
return uris;
8793
}
8894

8995
private static URI protocol(final String protocol, final String host, final int port) {

0 commit comments

Comments
 (0)