blob: 753a8814ac25c339d1345ff384769d9cf3e124c9 [file] [log] [blame]
// ========================================================================
// Copyright (c) Webtide LLC
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.apache.org/licenses/LICENSE-2.0.txt
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
package org.eclipse.jetty.logging;
import java.io.IOException;
import junit.framework.TestCase;
public class CentralizedLoggingTest extends TestCase
{
private XmlConfiguredJetty jetty;
@Override
protected void setUp() throws Exception
{
super.setUp();
jetty = new XmlConfiguredJetty(this);
jetty.addConfiguration("jetty.xml");
jetty.addConfiguration("jetty-centralized-logging.xml");
jetty.load();
jetty.start();
}
@Override
protected void tearDown() throws Exception
{
jetty.stop();
super.tearDown();
}
public void testLog4jRouting() throws IOException
{
SimpleRequest.get(jetty,"/commons/logging");
SimpleRequest.get(jetty,"/log4j/logging");
}
public void testCommonsRouting() throws IOException
{
SimpleRequest.get(jetty,"/commons/logging");
}
public void testSlf4jRouting() throws IOException
{
SimpleRequest.get(jetty,"/slf4j/logging");
}
public void testJavaUtilRouting() throws IOException
{
SimpleRequest.get(jetty,"/java/logging");
}
}