users@glassfish.java.net

Re: logging best practice

From: w.rittmeyer <w.rittmeyer_at_jsptutorial.org>
Date: Tue, 19 Dec 2006 18:49:50 +0100

w.rittmeyer_at_jsptutorial.org wrote:
>> I'm trying to deploy a WAR that includes log4j in the WEB-INF/lib.
>> GlassFish isn't finding it, and I understand from reading some of the
>> blogs that this is because commons-logging is getting loaded by the
>> System classloader is trying to instantiate the log4j classes that are
>> on the local Web classloader.
>
>
> I am a bit troubled here. From within ejb and web-projects. But I use commons-logging as an additional layer. So this might be the difference. Therefore I have both commons-loggin.jar and log4j.jar in my WEB-INF/lib directory. My log4j.properties is within WEB-INF/classes.
>

Ouch. S.th. went wrong while editing this mail ;-)

What I wanted to say with these strange two sentences at the beginning
of the upper paragraph is, that I am using log4j and that it works just
fine.

I also consider it a must. A lot of apps use log4j extensively and javas
build in logging never really took of. So any app server not being able
to support log4j logging wouldn't have a chance within the community.

But, as I've somewhat cryptically written, it works fine for me - for
ejb and web projects alike.


Wolfram