Skip to content

Commit d816f15

Browse files
committed
Merge branch 'master' of git://github.com/rmannibucau/cucumber-jvm
2 parents 43e5a19 + df702df commit d816f15

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

openejb/src/main/java/cucumber/runtime/java/openejb/OpenEJBObjectFactory.java

-27
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@
1515
import java.util.Properties;
1616

1717
public class OpenEJBObjectFactory implements ObjectFactory {
18-
static {
19-
try {
20-
configureLog4J();
21-
} catch (Throwable t) {
22-
throw new CucumberException(t);
23-
}
24-
}
25-
2618
private final List<String> classes = new ArrayList<String>();
2719
private final Map<Class<?>, Object> instances = new HashMap<Class<?>, Object>();
2820
private EJBContainer container;
@@ -69,24 +61,5 @@ public <T> T getInstance(Class<T> type) {
6961
instances.put(type, object);
7062
return object;
7163
}
72-
73-
private static void configureLog4J() throws Throwable {
74-
final ClassLoader cl = Thread.currentThread().getContextClassLoader();
75-
if (System.getProperty("log4j.configuration") == null && System.getProperty("log4j.configurationClass") == null
76-
&& cl.getResource("log4j.xml") == null && cl.getResource("log4j.properties") == null) {
77-
Properties log4jProp = new Properties();
78-
log4jProp.setProperty("log4j.rootLogger", "info, stdout");
79-
log4jProp.setProperty("log4j.appender.stdout", "org.apache.log4j.ConsoleAppender");
80-
try {
81-
cl.loadClass("org.apache.openejb.logging.SimpleJULLikeLayout");
82-
log4jProp.setProperty("log4j.appender.stdout.layout", "org.apache.openejb.logging.SimpleJULLikeLayout");
83-
} catch (Exception e) {
84-
log4jProp.setProperty("log4j.appender.stdout.layout", "org.apache.log4j.SimpleLayout");
85-
}
86-
87-
Method configure = cl.loadClass("org.apache.log4j.PropertyConfigurator").getDeclaredMethod("configure", Properties.class);
88-
Utils.invoke(null, configure, 0, log4jProp);
89-
}
90-
}
9164
}
9265

0 commit comments

Comments
 (0)