struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: Change logging declaration
Date Wed, 07 Aug 2002 23:51:10 GMT
I normally use an XML based config, but I think you need something like:

log4j.logger.org.apache.struts=INFO, A1
log4j.logger.org.apache.struts.additivity=false

log4j.logger.org.apache.commons.logging=INFO, A1
log4j.logger.org.apache.commons.logging.additivity=false

Basically, turn off additivity for those loggers (categories).

Chris Wall wrote:
> 
> Struts debug messages still outputted if the following entries are set in
> log4j.properties:
> 
>     # Set root logger level default debug and its only appender to A1.
>     log4j.rootLogger=, A1
> 
>     log4j.category.org.apache.struts=INFO
>     log4j.category.org.apache.commons.logging=INFO
>     log4j.category.[my.package.name]=DEBUG
> 
> The only way I've found to omit Struts debugging is setting the rootLogger
> to "ERROR" and manually setting my packages to "DEBUG".
> 
> Does anyone have any insight was to why "log4j.category.org.apache.struts"
> and "log4j.category.org.apache.commons.logging" does NOT properly set
> logging levels for Strut classes?
> 
> Thanks.
> 
> ----- Original Message -----
> From: "Craig R. McClanahan" <craigmcc@apache.org>
> To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> Sent: Friday, July 19, 2002 2:17 PM
> Subject: Re: Change logging declaration
> 
> >
> >
> > On Fri, 19 Jul 2002, Chris Wall wrote:
> >
> > > Date: Fri, 19 Jul 2002 14:13:58 -0700
> > > From: Chris Wall <cwall@bea.com>
> > > Reply-To: Struts Users Mailing List <struts-user@jakarta.apache.org>
> > > To: Struts Users Mailing List <struts-user@jakarta.apache.org>
> > > Subject: Change logging declaration
> > >
> > > The ActionServlet has lots of DEBUG messages during webapp loading, ie
> > > parsing of struts-config.xml.  This causes lines and lines of debug
> messages
> > > that increase startup time and increase buffer size.  Within our custom
> > > application we use log4j also, having debug messages.  The question is,
> > > without changing code, how can I turn strut's debug messaging off while
> > > retaining application level debugging?  I use a log4j inititalization
> > > servlet to load logging properties, and the ActionServlet debug
> parameter
> > > set to 0, no logging.
> > >
> >
> > I presume you're using Struts 1.1, right?  If so, just configure the log
> > level for "org.apache.struts" to be at INFO or higher, and you won't see
> > any of the debug messages.  In 1.1, the debug parameter on the controller
> > servlet doesn't do anything at all any more.
> >
> > Craig
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> >
> >
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>
Mime
View raw message