Skip to content

Commit b8e4b7a

Browse files
committed
add logging
1 parent 5cf80e2 commit b8e4b7a

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

src/main/java/com/arangodb/internal/InternalArangoDBBuilder.java

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929

3030
import javax.net.ssl.SSLContext;
3131

32+
import org.slf4j.Logger;
33+
import org.slf4j.LoggerFactory;
34+
3235
import com.arangodb.ArangoDB;
3336
import com.arangodb.ArangoDBException;
3437
import com.arangodb.entity.LoadBalancingStrategy;
@@ -57,6 +60,8 @@
5760
*
5861
*/
5962
public abstract class InternalArangoDBBuilder {
63+
64+
private static final Logger LOGGER = LoggerFactory.getLogger(InternalArangoDBBuilder.class);
6065

6166
private static final String PROPERTY_KEY_HOSTS = "arangodb.hosts";
6267
private static final String PROPERTY_KEY_HOST = "arangodb.host";
@@ -187,13 +192,16 @@ protected void setSerializer(final ArangoSerialization serializer) {
187192
this.customSerializer = serializer;
188193
}
189194

190-
protected HostResolver createHostResolver(
191-
final Collection<Host> hosts,
192-
final int maxConnections,
193-
final ConnectionFactory connectionFactory) {
194-
return Boolean.TRUE == acquireHostList
195-
? new ExtendedHostResolver(new ArrayList<Host>(hosts), maxConnections, connectionFactory)
196-
: new SimpleHostResolver(new ArrayList<Host>(hosts));
195+
protected HostResolver createHostResolver(final Collection<Host> hosts, final int maxConnections,final ConnectionFactory connectionFactory) {
196+
197+
if(acquireHostList) {
198+
LOGGER.info("acquireHostList -> Use ExtendedHostResolver");
199+
return new ExtendedHostResolver(new ArrayList<Host>(hosts), maxConnections, connectionFactory);
200+
} else {
201+
LOGGER.info("Use SimpleHostResolver");
202+
return new SimpleHostResolver(new ArrayList<Host>(hosts));
203+
}
204+
197205
}
198206

199207
protected HostHandler createHostHandler(final HostResolver hostResolver) {

0 commit comments

Comments
 (0)