[tomcat] 03/03: Add setting direction to debug logging.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 0e87d92a574c53ff392ebc792710c8ba53aea321 Author: Mark Thomas AuthorDate: Wed Sep 4 23:52:54 2019 +0100 Add setting direction to debug logging. --- java/org/apache/coyote/http2/ConnectionSettingsBase.java | 4 +++- java/org/apache/coyote/http2/ConnectionSettingsLocal.java | 8 java/org/apache/coyote/http2/ConnectionSettingsRemote.java | 8 java/org/apache/coyote/http2/LocalStrings.properties | 2 +- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/java/org/apache/coyote/http2/ConnectionSettingsBase.java b/java/org/apache/coyote/http2/ConnectionSettingsBase.java index 429cf14..8021b01 100644 --- a/java/org/apache/coyote/http2/ConnectionSettingsBase.java +++ b/java/org/apache/coyote/http2/ConnectionSettingsBase.java @@ -64,7 +64,7 @@ public abstract class ConnectionSettingsBase { public void set(Setting setting, long value) throws T { if (log.isDebugEnabled()) { log.debug(sm.getString("connectionSettings.debug", -connectionId, setting, Long.toString(value))); +connectionId, getEndpointName(), setting, Long.toString(value))); } switch(setting) { @@ -215,4 +215,6 @@ public abstract class ConnectionSettingsBase { abstract void throwException(String msg, Http2Error error) throws T; + +abstract String getEndpointName(); } diff --git a/java/org/apache/coyote/http2/ConnectionSettingsLocal.java b/java/org/apache/coyote/http2/ConnectionSettingsLocal.java index 54e2aa1..dd2e449 100644 --- a/java/org/apache/coyote/http2/ConnectionSettingsLocal.java +++ b/java/org/apache/coyote/http2/ConnectionSettingsLocal.java @@ -32,6 +32,8 @@ import java.util.Map; */ public class ConnectionSettingsLocal extends ConnectionSettingsBase { +private static final String ENDPOINT_NAME = "Local(client->server)"; + private boolean sendInProgress = false; @@ -97,4 +99,10 @@ public class ConnectionSettingsLocal extends ConnectionSettingsBase { +private static final String ENDPOINT_NAME = "Remote(server->client)"; + public ConnectionSettingsRemote(String connectionId) { super(connectionId); } @@ -31,4 +33,10 @@ public class ConnectionSettingsRemote extends ConnectionSettingsBase
[tomcat] 03/03: Add setting direction to debug logging.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 64c14b18bdd6088c623e29d27a88cbfff0e8598b Author: Mark Thomas AuthorDate: Wed Sep 4 23:52:54 2019 +0100 Add setting direction to debug logging. --- java/org/apache/coyote/http2/ConnectionSettingsBase.java | 4 +++- java/org/apache/coyote/http2/ConnectionSettingsLocal.java | 8 java/org/apache/coyote/http2/ConnectionSettingsRemote.java | 8 java/org/apache/coyote/http2/LocalStrings.properties | 2 +- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/java/org/apache/coyote/http2/ConnectionSettingsBase.java b/java/org/apache/coyote/http2/ConnectionSettingsBase.java index 515219e..ed0dcd3 100644 --- a/java/org/apache/coyote/http2/ConnectionSettingsBase.java +++ b/java/org/apache/coyote/http2/ConnectionSettingsBase.java @@ -64,7 +64,7 @@ abstract class ConnectionSettingsBase { final void set(Setting setting, long value) throws T { if (log.isDebugEnabled()) { log.debug(sm.getString("connectionSettings.debug", -connectionId, setting, Long.toString(value))); +connectionId, getEndpointName(), setting, Long.toString(value))); } switch(setting) { @@ -215,4 +215,6 @@ abstract class ConnectionSettingsBase { abstract void throwException(String msg, Http2Error error) throws T; + +abstract String getEndpointName(); } diff --git a/java/org/apache/coyote/http2/ConnectionSettingsLocal.java b/java/org/apache/coyote/http2/ConnectionSettingsLocal.java index af7ff8c..64e68bb 100644 --- a/java/org/apache/coyote/http2/ConnectionSettingsLocal.java +++ b/java/org/apache/coyote/http2/ConnectionSettingsLocal.java @@ -32,6 +32,8 @@ import java.util.Map; */ class ConnectionSettingsLocal extends ConnectionSettingsBase { +private static final String ENDPOINT_NAME = "Local(client->server)"; + private boolean sendInProgress = false; @@ -97,4 +99,10 @@ class ConnectionSettingsLocal extends ConnectionSettingsBase { +private static final String ENDPOINT_NAME = "Remote(server->client)"; + ConnectionSettingsRemote(String connectionId) { super(connectionId); } @@ -31,4 +33,10 @@ class ConnectionSettingsRemote extends ConnectionSettingsBase