package com.wizzardo.servlet;

import com.wizzardo.tools.http.HttpClient;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.junit.After;
import org.junit.Before;

/**
 * @author: wizzardo
 * Date: 23.10.14
 */
public class ServerTest {
    protected CustomServlet servlet;
    private Server jetty;
    private int jettyPort = 8080;

    @Before
    public void setUp() throws Exception {
        jetty = new Server(jettyPort);

        ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
        context.setContextPath("/servlet");
        jetty.setHandler(context);

        servlet = new CustomServlet();
        context.addServlet(new ServletHolder(servlet), "/*");
        jetty.start();
    }

    @After
    public void tearDown() throws Exception {
        jetty.stop();
        servlet.clean();
    }

    protected com.wizzardo.tools.http.Request jettyRequest(String path) {
        return HttpClient.createRequest("http://localhost:" + jettyPort + path)
                .header("Connection", "Close");
    }

    public int jettyPort() {
        return jettyPort;
    }
}

@@ -207,24 +207,69 @@
 vletHolder;%0A
+import org.eclipse.jetty.util.log.StdErrLog;%0A
 import org.j
@@ -306,16 +306,46 @@
 efore;%0A%0A
+import java.util.Properties;%0A%0A
 /**%0A * @
@@ -554,32 +554,216 @@
 ows Exception %7B%0A
+        Properties loggingProperties = new Properties();%0A        loggingProperties.setProperty(%22org.eclipse.jetty.LEVEL%22, %22WARN%22);%0A        StdErrLog.setProperties(loggingProperties);%0A%0A
         jetty = 

fix logs