You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ro...@hydro.qc.ca on 2002/11/26 22:05:46 UTC

setting debug level for digester, sax, beanUtils...

Hi,

I am trying to turn off logging for Struts and sub-components while keeping
logging on for my own code. I have put the debug and detail init parameter
to 0 in web.xml but I receive debug messages from digester, sax, beanUtils
and others.

Does anyone know how to confugure the struts-config or/and web.xml?

Thanks
Stephan

Re: setting debug level for digester, sax, beanUtils...

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 26 Nov 2002 Roy.Stephan@hydro.qc.ca wrote:

> Date: Tue, 26 Nov 2002 16:05:46 -0500
> From: Roy.Stephan@hydro.qc.ca
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: setting debug level for digester, sax, beanUtils...
>
>
> Hi,
>
> I am trying to turn off logging for Struts and sub-components while keeping
> logging on for my own code. I have put the debug and detail init parameter
> to 0 in web.xml but I receive debug messages from digester, sax, beanUtils
> and others.
>

In 1.1, Struts and all the commons libraries it employes use
commons-logging as an abstraction to the underlying logging system -- in
turn, this allows you to use a variety of logging implementations such as
Log4J, JDK 1.4 logging, or a simple write-to-System.err default
implementation.  The actual configuration of the logging is done with the
configuration file for your logging mechanism (for example, to set up JDK
1.4 logging you edit <$JAVA_HOME/jre/lib/logging.properties>.

To configure *what* gets logged, the important issue is to understand the
default log name conventions of Apache code (typically the fully qualified
class name of the corresponding class).  Also, the typical logging
configuraiton file is hierarchical -- so that you can say things like this
to set the usual Struts logging levels to INFO, but get detailed debug
info from RequestProcessor (uses JDK 1.4 syntax):

org.apache.struts.level =INFO
org.apache.struts.action.RequestProcessor.level = DEBUG

Check the docs for configuring whichever logging implementation you want
to use for how to configure levels by logger name.  For the simple default
logger, it's in the package description at:

http://jakarta.apache.org/commons/logging/api/


> Does anyone know how to confugure the struts-config or/and web.xml?
>
> Thanks
> Stephan
>

Craig



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>