Elffuss BraidHub

kikocis/java-driver public

Improve connection logs.
Changesetcf0c71ebe87f4dcd7a4305f00e0ce397bdd489d47903eb15c0670621d2a84f5c
Authorolim7t <omichallat+github@gmail.com> · 2015-11-09 14:47 +01:00
Committerolim7t <omichallat+github@gmail.com> · 2015-11-09 15:03 +01:00
Parentsa1636d85e74d

Browse the files at this changeset

1 file changed

modified driver-core/src/main/java/com/datastax/driver/core/Connection.java +4 −4
@@ -434,15 +434,15 @@
434434 } catch (ConnectionException e) {
435435 throw defunct(e);
436436 } catch (BusyConnectionException e) {
437- logger.warn("Tried to set the keyspace on busy connection to {}. "
438- + "This should not happen but is not critical (it will be retried)", address);
437+ logger.warn("Tried to set the keyspace on busy {}. "
438+ + "This should not happen but is not critical (it will be retried)", this);
439439 throw new ConnectionException(address, "Tried to set the keyspace on busy connection");
440440 } catch (ExecutionException e) {
441441 Throwable cause = e.getCause();
442442 if (cause instanceof OperationTimedOutException) {
443443 // Rethrow so that the caller doesn't try to use the connection, but do not defunct as we don't want to mark down
444- logger.warn("Timeout while setting keyspace on connection to {}. "
445- + "This should not happen but is not critical (it will be retried)", address);
444+ logger.warn("Timeout while setting keyspace on {}. "
445+ + "This should not happen but is not critical (it will be retried)", this);
446446 throw new ConnectionException(address, "Timeout while setting keyspace on connection");
447447 } else {
448448 throw defunct(new ConnectionException(address, "Error while setting keyspace", cause));