[slf4j-user] Re: Configuring JCL over SLF4J

Kees de Kooter kdekooter at gmail.com
Thu Dec 8 12:52:44 CET 2005


Thanks Heiner,

I did some more testing and found out that indeed Tomcat does not play
nice. Tomcat contains commons logging. CL is already loaded by tomcat
and as a result the jcl-over-slf4j is never used. And the log4j config
of my app is not used either.

I deployed CL with my app again and now all logging ends up in the
log4j log again. So my setup now is:

spring / hibernate --> JCL --> LOG4J
my code --> SLF4J - LOG4J

regards,
Kees


On 12/8/05, Heiner Westphal <susp48 at verit.de> wrote:
> Hello Kees!
>
> Did you try to capture the hibernate and spring logs
> using the jcl104-slf4j bridge?
> I'm not sure, if it plays nice with tomcat's
> JCL though.
>
> If not, you still can redirect your slf4j-logs
> to jcl using slf4j-jcl, which is available with
> the lates release of slf4j.
>
> Then you will get tomcat's and your webapp's logs
> mixed, but you can separate them by log4j config
> (as long as tomcat does not use spring or hibernate).
>
> For a very short and well done description on
> different configurations of slf4j and jcl
> see
> http://article.gmane.org/gmane.comp.java.jetty.general/6294/match=release+6+0+0beta4
> where Greg Wilkins explains his use case for a slf4j-jcl jar.
>
> [if the url got split try http://tinyurl.com/bvo56 ]
>
> Regards,
>
> Heiner
>
> Kees de Kooter wrote:
> > I am working on a (tomcat) web app using spring and hibernate. Both
> > use commons logging. My own code uses slf4j (of course ;) + log4j.
> >
> > No when I start my app under tomcat a lot of spring and hibernate
> > logging appears on the console. The logging of my app is written to
> > the file confgirued in log4j.xml.
> >
> > How can I send the JCL logging to the same log file?
> >
> > Kees
>
> _______________________________________________
> user mailing list
> user at slf4j.org
> http://slf4j.org/mailman/listinfo/user
>



More information about the slf4j-user mailing list