activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/2] activemq-artemis git commit: NO-JIRA Fixed log level test on NettyConnection
Date Thu, 06 Apr 2017 17:23:56 GMT
NO-JIRA Fixed log level test on NettyConnection


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/41a069a3
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/41a069a3
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/41a069a3

Branch: refs/heads/master
Commit: 41a069a3464301acf6602980bf6d3b67251de6e7
Parents: 7d9ae1a
Author: Francesco Nigro <nigro.fra@gmail.com>
Authored: Thu Apr 6 18:06:46 2017 +0200
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Thu Apr 6 13:23:49 2017 -0400

----------------------------------------------------------------------
 .../core/remoting/impl/netty/NettyConnection.java       | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/41a069a3/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
index e8941af..373c2f7 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
@@ -295,7 +295,7 @@ public class NettyConnection implements Connection {
    public final boolean blockUntilWritable(final int requiredCapacity, final long timeout,
final TimeUnit timeUnit) {
       final boolean isAllowedToBlock = isAllowedToBlock();
       if (!isAllowedToBlock) {
-         if (!logger.isDebugEnabled()) {
+         if (logger.isDebugEnabled()) {
             logger.debug("Calling blockUntilWritable using a thread where it's not allowed");
          }
          return canWrite(requiredCapacity);
@@ -347,14 +347,12 @@ public class NettyConnection implements Connection {
                            final boolean batched,
                            final ChannelFutureListener futureListener) {
       final int readableBytes = buffer.readableBytes();
-      if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) {
+      if (logger.isDebugEnabled()) {
          final int remainingBytes = this.writeBufferHighWaterMark - readableBytes;
          if (remainingBytes < 0) {
-            if (logger.isDebugEnabled()) {
-               logger.debug("a write request is exceeding by " + (-remainingBytes) +
-                               " bytes the writeBufferHighWaterMark size [ " + this.writeBufferHighWaterMark
+
-                               " ] : consider to set it at least of " + readableBytes + "
bytes");
-            }
+            logger.debug("a write request is exceeding by " + (-remainingBytes) +
+                            " bytes the writeBufferHighWaterMark size [ " + this.writeBufferHighWaterMark
+
+                            " ] : consider to set it at least of " + readableBytes + " bytes");
          }
       }
       //no need to lock because the Netty's channel is thread-safe


Mime
View raw message