commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren Hall" <dh...@utrs.com>
Subject RE: turning on debugging with commons logging
Date Tue, 13 Jun 2006 20:26:22 GMT
Thanks Dennis,

I'm using Struts "out of the box" so I have no logging package in place.
I have no commons-logging.properties file and nothing referring to Log4J or
anything of the sort.

It seems to me that commons-logging is using the Tomcat default logging
(thus it outputs to 'catalina.log').

I've gone ahead and downloaded Log4J and included the Log4J.jar file in my
WEB-INF/lib directory when deploying my webapp. I've also created a
commons-logging.properties file (below) that I found as an example online.

#########################

#
# $Id: commons-logging.properties,v 1.0 2006/06/31 14:35:33Z dhall $
# 

# 
# This file controls which logging package the Jakarta Commons Logging
package
# uses. This can be changed to point to any supported logging package. See
# http://jakarta.apache.org/commons/logging for a list of supported logging
# packages.
# 
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jF
actory

#########################

However, when I try to deploy my war file in Tomcat I now get a
ClassDefNotFound org.apache.commons.logging.impl.Log4jFactory error.

On the commons-logging website, I see that Log4jFactory is deprecated and
not included in commons-logging 1.1 and beyond.

How do I tell commons-logging to use Log4j (or do I not tell it since it
looks for it by default)?

Thanks,

Darren



-----Original Message-----
From: Dennis Lundberg [mailto:dennisl@apache.org] 
Sent: Tuesday, June 13, 2006 2:41 PM
To: Jakarta Commons Users List
Subject: Re: turning on debugging with commons logging

Darren Hall wrote:
> Greeting all,
> 
>  
> 
> I'm having a hard time turning on debugging in Apache struts (which is
using
> commons logging).
> 
> I know this should be easy to do, however I'm having a hard time finding
the
> information on the web.
> 
> Can anyone here tell me how to configure commons logging so that it will
> display DEBUG level statements, please (currently it displays on INFO
level
> and above)?

This all depends on what underlying logging implementation that your app 
or Struts is using. I haven't used Struts myself, so cannot comment on 
how to configure Struts.

The general user guide for commons-logging is here:
http://jakarta.apache.org/commons/logging/commons-logging-1.1/guide.html

If your app is using SimpleLog then this is the good place to look:
http://jakarta.apache.org/commons/logging/apidocs/org/apache/commons/logging
/impl/SimpleLog.html

If your app is using JDK logging (if you are running on Java 1.4+) you 
should consult the documentation for the JDK.


-- 
Dennis Lundberg

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





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


Mime
View raw message