[slf4j-user] A bit lost with PlayFramework + LOG4J + SLF4J + JUL ...

Julien Larios julien.larios at gmail.com
Wed Jan 12 19:04:14 CET 2011


Hi there,

I develop a web application using Play Framework 1.1.
This framework implements its own Logger classes, based on log4j (with a
logger called "play")

By default on install, Play runs with:
commons-logging-1.1.1.jar
log4j-1.2.15.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar
(and many other jar files)

For now, everything is fine: I use Logger.debug("Hello!"); in my own classes
and I can fine tune via a basic log4j.properties

But now, I have to use an external jar called restfb-1.6.jar for some
Facebook API calls. This library is based on java.util.logging.

And I really don't know how, and if it's possible, to redirect logs from
restfb-1.6.jar to my main log4j instance.
I would like to manage all logging of my project within the same
log4j.properties.

If I understood well, I have to import also "jul-to-slf4j-1.6.1.jar" to make
jul->slf4j, and then slf4j->log4j
If I try to add "log4j.logger.com.restfb=ERROR" in my log4j.properties it
has no effect.

I found nothing related to such a scenario in maling list archives.

Thanks for your help

Regards,

Julien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/slf4j-user/attachments/20110112/fec34e2c/attachment-0001.html>


More information about the slf4j-user mailing list