kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 743d7237895c4a0559efbeacce7c859754d86e9bda33b56f8550607e0ebb8bec |
|---|---|
| Author | Olivier Michallat <olim7t@users.noreply.github.com> · 2015-07-29 15:49 +02:00 |
| Committer | Olivier Michallat <olim7t@users.noreply.github.com> · 2015-07-29 15:49 +02:00 |
| Parents | 56a63006452d, 00883e9d0d4d |
2 files changed
modified changelog/README.md +1 −0
| @@ -2,6 +2,7 @@ | ||
| 2 | 2 | |
| 3 | 3 | ### 2.0.11 (in progress) |
| 4 | 4 | |
| 5 | +- [improvement] Log streamid at the trace level on sending request and receiving response (JAVA-718) | |
| 5 | 6 | - [bug] Fix SpeculativeExecutionPolicy.init() and close() are never called (JAVA-796) |
| 6 | 7 | - [improvement] Suppress unnecessary warning at shutdown (JAVA-710) |
| 7 | 8 | - [improvement] Allow DNS name with multiple A-records as contact point (#340) |
modified driver-core/src/main/java/com/datastax/driver/core/Connection.java +4 −4
| @@ -516,7 +516,7 @@ | ||
| 516 | 516 | throw new ConnectionException(address, "Connection has been closed"); |
| 517 | 517 | } |
| 518 | 518 | |
| 519 | - logger.trace("{} writing request {}", this, request); | |
| 519 | + logger.trace("{}, stream {}, writing request {}", this, request.getStreamId(), request); | |
| 520 | 520 | writer.incrementAndGet(); |
| 521 | 521 | |
| 522 | 522 | if (DISABLE_COALESCING) { |
| @@ -538,7 +538,7 @@ | ||
| 538 | 538 | writer.decrementAndGet(); |
| 539 | 539 | |
| 540 | 540 | if (!writeFuture.isSuccess()) { |
| 541 | - logger.debug("{} Error writing request {}", Connection.this, request); | |
| 541 | + logger.debug("{}, stream {}, Error writing request {}", Connection.this, request.getStreamId(), request); | |
| 542 | 542 | // Remove this handler from the dispatcher so it don't get notified of the error |
| 543 | 543 | // twice (we will fail that method already) |
| 544 | 544 | dispatcher.removeHandler(handler, true); |
| @@ -562,7 +562,7 @@ | ||
| 562 | 562 | } |
| 563 | 563 | }); |
| 564 | 564 | } else { |
| 565 | - logger.trace("{} request sent successfully", Connection.this); | |
| 565 | + logger.trace("{}, stream {}, request sent successfully", Connection.this, request.getStreamId()); | |
| 566 | 566 | } |
| 567 | 567 | } |
| 568 | 568 | }; |
| @@ -955,7 +955,7 @@ | ||
| 955 | 955 | int streamId = response.getStreamId(); |
| 956 | 956 | |
| 957 | 957 | if(logger.isTraceEnabled()) |
| 958 | - logger.trace("{} received: {}", Connection.this, asDebugString(response)); | |
| 958 | + logger.trace("{}, stream {}, received: {}", Connection.this, streamId, asDebugString(response)); | |
| 959 | 959 | |
| 960 | 960 | if (streamId < 0) { |
| 961 | 961 | factory.defaultHandler.handle(response); |