You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Affan Qureshi <qu...@etilize.com> on 2003/04/09 15:38:25 UTC

Re: Query | Apache Commons and Log4J

Hi,
Does it matter to Struts if I don't have commons-logging.jar in WEB-INF/lib?
I mean if I place both the jar files in common/lib will I be able to
confgure logging differently for my webapps without affecting Tomcat's
default logging?

The result I get of putting the jar files in my WEB-INF/lib is that after my
app is loaded _all_ log messages (from tomcat and Struts too) appear in my
log file instead of catalina.out or console.

What would an ideal set up be if I want to up log4j behind commons-logging
on Tomcat w/struts?

Thanks a lot for your time.

Affan

From: Craig R. McClanahan
Subject: Re: Query | Apache Commons and Log4J
Date: Wed, 02 Apr 2003 13:43:04 -0800
On Wed, 2 Apr 2003, Bajwa Rajpreet-W3818C wrote:

> Date: Wed, 2 Apr 2003 14:45:31 -0600
> From: Bajwa Rajpreet-W3818C <[EMAIL PROTECTED]>
> Reply-To: Jakarta Commons Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Query | Apache Commons and Log4J
>
> Hi,
> I am working with Apache Commons and Log4j for the first time And am
facing
> set up issues.
> I have compiled and deployed my code , when I try to Log , that is
> Get an instance of LogFactory I get a class not found exception (Given
> below).
> I have included common-logging.jar in my classpath , this jar has both the
> commons
> files and the Log4jFactory class. If org.apache.commons.logging.Log is
found
>
> Why is org.apache.commons.logging.impl.Log4jFactory not found being in the
> same jar. Is there something I am missing.
> Will appreciate help ASAP.

One way to cause yourself lots of grief would be to have
commons-logging.jar and/or log4j.jar in more than one place in your class
loader hierarchy.  I don't know what WebLogic's analog of Tomcat's
common/lib directory is, but putting things both inside your webapp and in
a shared directory will cause problems.

> Thanks
> Rajpreet

Craig


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org