[slf4j-user] using log4j-over-slf4j with jetty 6

Michael Flester flester at gmail.com
Wed Nov 22 02:53:02 CET 2006


Hi --

An existing project of mine uses log4j. This project
also embeds a Jetty server. In trying to upgrade
from Jetty 5 to Jetty 6 all of the Jetty logging
started going to stdout and Jetty says it will do
something different if it finds an slf4j.Logger on
the classpath.

Ok, so I found slf4j-api-1.1.0-RC1.jar and
log4j-over-slf4j-1.1.0-RC1.jar, and put them on
my classpath, removing the former log4j-1.2.14.jar .
Looks like a great idea.

I haven't gotten as far as figuring out whether
Jetty understands this as some things that
I was using in log4j do not seem implemented
in the log4j-over-slf4j classes.

Namely --

org.apache.log4j.Logger                                   .setLevel(Level)
                                   .getLevel(Level)
                                   .isEnabledFor(Level)
                                   .log(Level,Object)
                                   .log(Level,Object,Throwable)

Other things I need are missing, like org.apache.log4j.Level
but by putting the old log4j log file on the classpath after
the slf4j I get past that but not
the missing methods on Logger. Is using the log4j.jar file
in addition to the two slf4j jar files the way to go about this?

Reading the list archive, I sense some of this may be
by design, but I'm not sure. Can someone clarify
if I am doing this right?

How would you integrate Jetty 6 and it's new slf4j
requirement into an existing log4j enabled project
using slf4j?

Thanks,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/slf4j-user/attachments/20061121/cb9f54d7/attachment.htm>


More information about the slf4j-user mailing list