Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2015-04-21 20:37:39 -0400
committerGreg Wilkins2015-04-21 20:37:39 -0400
commit9eb2cb4c0f5f9131f7f855836817c88519da0cfe (patch)
tree701d50dd1142df4be27042643b9981180dfff6b0 /jetty-servlet
parentbcd4e5fc450ee65995442aa495597c5cfd5a0771 (diff)
downloadorg.eclipse.jetty.project-9eb2cb4c0f5f9131f7f855836817c88519da0cfe.tar.gz
org.eclipse.jetty.project-9eb2cb4c0f5f9131f7f855836817c88519da0cfe.tar.xz
org.eclipse.jetty.project-9eb2cb4c0f5f9131f7f855836817c88519da0cfe.zip
446564 Refactored RequestLog Mechanism
reverted API
Diffstat (limited to 'jetty-servlet')
-rw-r--r--jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletTest.java5
-rw-r--r--jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletRequestLogTest.java3
2 files changed, 6 insertions, 2 deletions
diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletTest.java
index 184997b0ce..295b8eec74 100644
--- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletTest.java
+++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletTest.java
@@ -45,6 +45,7 @@ import javax.servlet.http.HttpServletResponseWrapper;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.RequestLog;
+import org.eclipse.jetty.server.Response;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.handler.RequestLogHandler;
@@ -887,8 +888,10 @@ public class AsyncServletTest
class Log extends AbstractLifeCycle implements RequestLog
{
@Override
- public void log(Request request, int status, long written)
+ public void log(Request request, Response response)
{
+ int status = response.getCommittedMetaData().getStatus();
+ long written = response.getHttpChannel().getBytesWritten();
_log.add(status+" "+written+" "+request.getRequestURI());
}
}
diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletRequestLogTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletRequestLogTest.java
index 5f0198b4a0..05e71594e9 100644
--- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletRequestLogTest.java
+++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletRequestLogTest.java
@@ -77,8 +77,9 @@ public class ServletRequestLogTest
public List<String> captured = new ArrayList<>();
@Override
- public void log(Request request, int status, long written)
+ public void log(Request request, Response response)
{
+ int status = response.getCommittedMetaData().getStatus();
captured.add(String.format("%s %s %s %03d",request.getMethod(),request.getRequestURI(),request.getProtocol(),status));
}
}

Back to the top