I've recently been testing our applications on log4j 1.6.1 and also used the log4j-over-slf4j bridge.

Everything has worked beautifully thus far with but one exception: one of the developers authored some Ant-related code which registers a listener:

Project antProj = new org.apache.tools.ant.Project();
Log4jListener log4jListener = new org.apache.tools.ant.listener.Log4jListener();
antProj.addBuildListener(log4jListener);

This results in the following Exception:

java.lang.NoSuchMethodError: org.apache.log4j.Logger.getAllAppenders()Ljava/util/Enumeration; at org.apache.tools.ant.listener.Log4jListener.<init>(Log4jListener.java:51) at com.telesoft.ant.AntTargetLauncher.executeAntTask(AntTargetLauncher.java:32)
    ...

I stubbed out this method in org/apache/log4j/Category.java and got past that hurdle only to encounter the following:

java.lang.NoClassDefFoundError: org/apache/log4j/helpers/NullEnumeration
at org.apache.tools.ant.listener.Log4jListener.<init>(Log4jListener.java:51) at com.telesoft.ant.AntTargetLauncher.executeAntTask(AntTargetLauncher.java:32)
    ...

How does one replace log4j/Ant integration via slf4j?

Thanks.


--
Scott Dudley
Senior Developer

Telesoft Corp. | 1661 E. Camelback Rd., Suite 300 | Phoenix, AZ, 85016

*o:* (602) 308-1115**| *f:* (602) 308-1300 | *w:* www.telesoft.com <http://www.telesoft.com>

*TEM Edge Blog <http://www.telesoft.com/blog> *|*Twitter <http://www.twitter.com/_Telesoft> *|*Facebook

<http://www.facebook.com/pages/Telesoft-Corp/76397971661>Join us at Telesoft Connections 2011. Learn more now! <http://www.telesoftconference.com>*

_______________________________________________
slf4j-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/slf4j-user

Reply via email to