struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eddie Bush <>
Subject Re: logging in struts
Date Mon, 23 Sep 2002 17:27:39 GMT
The commons-logging package is an ultra-lightweight interface to ... 
whichever logging package is available:
    - jdk1.4?  use that unless otherwise stated
    - log4j? use that unless otherwise stated
    - something else?  use that unless otherwise stated (see site for 
the ones it will look for)
    - nothing?  Fine - use the simple console logger

By using commons-logging, you alleviate the need to refactor just 
because you want to use a different logging mechanism.  If you want to 
use JDK1.4 logger, you can -- if not, you can use something else. 
 Struts includes commons-logging, so incorporating it into your 
application can be as easy as adding includes and declaring the logger. 
 Note that if you wind up using Log4J, you may seriously want to 
consider grabbing a fresh JAR for commons-logging before you start. 
 There's some wild problem that will give you fits if you don't.  You 
won't notice this unless you're using Log4J (I didn't, at least) though. 
 STMA (Search the Mail Archive) for an explaination of the 
problem/solution, or just install a new JAR.

By default, JDK 1.4 logging configuration lives in:


You can override it.  See Sun's site for details, if you wish to do that.

Mark Silva wrote:

>hey there,
>i was wondering what people ar eusing for logging in struts.  it seems that with jdk1.4,
and the included logging, that would be the right framework.  has anybody had readon to use
something else, like the jakarta package, or log4j?  
>also i had a question about the configuration file for the loggin using jdk1.4.  where
does this go in a typical tomcat/struts setup? 
Eddie Bush

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message