From 30532786cc2395e530c608600f7c9ccd2a353c06 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Sun, 13 Sep 2015 11:33:58 +0200 Subject: [PATCH] Improved logging. --- .../main/java/org/eclipse/jetty/http2/HTTP2Session.java | 9 ++++++++- .../eclipse/jetty/http2/server/HTTP2ServerSession.java | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java index 042de6fc927..6ee9c136b9f 100644 --- a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java +++ b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java @@ -199,6 +199,8 @@ public abstract class HTTP2Session implements ISession, Parser.Listener @Override public void onPriority(PriorityFrame frame) { + if (LOG.isDebugEnabled()) + LOG.debug("Received {}", frame); } @Override @@ -223,6 +225,9 @@ public abstract class HTTP2Session implements ISession, Parser.Listener public void onSettings(SettingsFrame frame, boolean reply) { + if (LOG.isDebugEnabled()) + LOG.debug("Received {}", frame); + if (frame.isReply()) return; @@ -305,6 +310,7 @@ public abstract class HTTP2Session implements ISession, Parser.Listener { if (LOG.isDebugEnabled()) LOG.debug("Received {}", frame); + if (frame.isReply()) { notifyPing(this, frame); @@ -383,6 +389,7 @@ public abstract class HTTP2Session implements ISession, Parser.Listener { if (LOG.isDebugEnabled()) LOG.debug("Received {}", frame); + int streamId = frame.getStreamId(); if (streamId > 0) { @@ -644,7 +651,7 @@ public abstract class HTTP2Session implements ISession, Parser.Listener return null; } } - + public IStream createUpgradeStream() { // SPEC: upgrade stream is id=1 and can't exceed maximum diff --git a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerSession.java b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerSession.java index c209895a885..7d53e206afe 100644 --- a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerSession.java +++ b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerSession.java @@ -68,6 +68,9 @@ public class HTTP2ServerSession extends HTTP2Session implements ServerParser.Lis @Override public void onHeaders(HeadersFrame frame) { + if (LOG.isDebugEnabled()) + LOG.debug("Received {}", frame); + MetaData metaData = frame.getMetaData(); if (metaData.isRequest()) {