logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: setting up log4j
Date Tue, 13 Jun 2006 05:02:15 GMT

Put log4j.jar and commons-logging-adapters-1.1.jar (see 
commons-logging release notes for this newly distributed jar) in 
WEB-INF/lib.  This assumes that commons-logging-api.jar is in the 
classpath.  If this doesn't work, just use the 
commons-logging-1.1.jar.  Put your Log4j config file in 
WEB-INF/classes.  You might want to use log4j.xml, since the XML 
config files are picked up in preference to the properties files and 
if there is a log4j.xml elsewhere on the classpath, Log4j might use 
it instead of the properties file you think it is using.  When in 
doubt, set -Dlog4j.debug=true.


At 04:02 PM 6/12/2006, you wrote:
 >Greetings all,
 >I'm using Struts 1.2.9 (with commons-logging 1.1) and the problem I'm having
 >is that I cannot seem to get my DEBUG level log statements to print.
 >>From what I've read online, it seems that commons-logging is a wrapper
 >around log4j (actually I have not confirmed this and tend to doubt it since
 >I don't see any references to log4j in my installation of struts). In any
 >case, the commons-logging output for struts is printing to the Tomcat logs.
 >It does not print my DEBUG level messages, and I need to get this to happen.
 >Since I couldn't find a reference to log4j in my Struts installation, I
 >downloaded log4j and included it in my build of struts, and now I get no
 >messages to print to the Tomcat logs (not INFO or ERROR, which were printing
 >before I installed log4j). I created a simple "log4j.properties" file to
 >attempt to configure log4j and obviously I failed miserably.
 >Basically I need to know how to either A) get my debug messages printing to
 >the Tomcat output using the commons-logging functionality; or B) get log4j
 >configured properly so that it will allow me to output debug messages. (If I
 >need to go with the second option, it would be nice to have it output to a
 >log file specific to my application and not the Tomcat log file - although
 >I'm not sure how to go about configuring this.)
 >Can anyone please get me started with this issue?

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

View raw message