Disable Lumberjack and Log4j 1.x and document it (#182)
This PR removes Lumberjack and Log4j 1.x for the automatic logging backend discovery procedure. The updated procedure is documented in the guide. This closes LOGGING-173 and LOGGING-188.
This commit is contained in:
@@ -19,6 +19,9 @@ package org.apache.commons.logging.log4j.log4j12;
|
||||
|
||||
import org.apache.commons.logging.PathableClassLoader;
|
||||
import org.apache.commons.logging.PathableTestSuite;
|
||||
import org.apache.commons.logging.impl.Log4JLogger;
|
||||
import org.apache.commons.logging.impl.Log4jApiLogFactory;
|
||||
import org.apache.commons.logging.impl.LogFactoryImpl;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
@@ -36,6 +39,8 @@ public class ApiClasspathStandardTestCase extends TestCase {
|
||||
* Return the tests included in this test suite.
|
||||
*/
|
||||
public static Test suite() throws Exception {
|
||||
// Ensure Log4JLogger is used
|
||||
System.setProperty(LogFactoryImpl.LOG_PROPERTY, Log4JLogger.class.getName());
|
||||
final PathableClassLoader parent = new PathableClassLoader(null);
|
||||
parent.useExplicitLoader("junit.", Test.class.getClassLoader());
|
||||
parent.addLogicalLib("commons-logging-api");
|
||||
|
||||
@@ -19,6 +19,8 @@ package org.apache.commons.logging.log4j.log4j12;
|
||||
|
||||
import org.apache.commons.logging.PathableClassLoader;
|
||||
import org.apache.commons.logging.PathableTestSuite;
|
||||
import org.apache.commons.logging.impl.Log4JLogger;
|
||||
import org.apache.commons.logging.impl.LogFactoryImpl;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
@@ -34,6 +36,8 @@ public class AppClasspathStandardTestCase extends TestCase {
|
||||
* Return the tests included in this test suite.
|
||||
*/
|
||||
public static Test suite() throws Exception {
|
||||
// Ensure Log4JLogger is used
|
||||
System.setProperty(LogFactoryImpl.LOG_PROPERTY, Log4JLogger.class.getName());
|
||||
final PathableClassLoader loader = new PathableClassLoader(null);
|
||||
loader.useExplicitLoader("junit.", Test.class.getClassLoader());
|
||||
loader.addLogicalLib("testclasses");
|
||||
|
||||
@@ -19,6 +19,8 @@ package org.apache.commons.logging.log4j.log4j12;
|
||||
|
||||
import org.apache.commons.logging.PathableClassLoader;
|
||||
import org.apache.commons.logging.PathableTestSuite;
|
||||
import org.apache.commons.logging.impl.Log4JLogger;
|
||||
import org.apache.commons.logging.impl.LogFactoryImpl;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
@@ -35,6 +37,8 @@ public class ChildClasspathStandardTestCase extends TestCase {
|
||||
* Return the tests included in this test suite.
|
||||
*/
|
||||
public static Test suite() throws Exception {
|
||||
// Ensure Log4JLogger is used
|
||||
System.setProperty(LogFactoryImpl.LOG_PROPERTY, Log4JLogger.class.getName());
|
||||
final PathableClassLoader parent = new PathableClassLoader(null);
|
||||
parent.useExplicitLoader("junit.", Test.class.getClassLoader());
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ package org.apache.commons.logging.log4j.log4j12;
|
||||
|
||||
import org.apache.commons.logging.PathableClassLoader;
|
||||
import org.apache.commons.logging.PathableTestSuite;
|
||||
import org.apache.commons.logging.impl.Log4JLogger;
|
||||
import org.apache.commons.logging.impl.LogFactoryImpl;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
@@ -34,6 +36,8 @@ public class ParentClasspathStandardTestCase extends TestCase {
|
||||
* Return the tests included in this test suite.
|
||||
*/
|
||||
public static Test suite() throws Exception {
|
||||
// Ensure Log4JLogger is used
|
||||
System.setProperty(LogFactoryImpl.LOG_PROPERTY, Log4JLogger.class.getName());
|
||||
final PathableClassLoader parent = new PathableClassLoader(null);
|
||||
parent.useExplicitLoader("junit.", Test.class.getClassLoader());
|
||||
parent.addLogicalLib("commons-logging");
|
||||
|
||||
Reference in New Issue
Block a user