You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Giovanni Azua <gi...@imc.nl> on 2008/02/15 10:00:19 UTC

tons of useless logging slowing my app down

hi,

I have just bumped into the same logging issue as others have. I 
basically get tons of this:
WARNING: Could not find property [theme]
Feb 15, 2008 9:53:06 AM 
com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn

My setup is:
- Struts 2.1.x built from trunk
- I import only commons.logging.jar and not log4j (is not allowed). 

I have searched all Struts 2 sources looking for example logging 
configurations:

[giaz@helen struts2]$ find . \( \( -name "*.properties" -or -name 
"*.xml" \) -and -not -name "webapp-cache.xml" -and -not -name "pom.xml" 
\) -exec grep -Hi "logging" {} \;
./core/target/xwork-sources/xwork-default.xml:            <interceptor 
name="logger" 
class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
./core/target/classes/struts-default.xml:            <interceptor 
name="logger" 
class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
./core/src/main/resources/struts-default.xml:            <interceptor 
name="logger" 
class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
./apps/showcase/target/struts2-showcase/WEB-INF/classes/log4j.properties:# 
Log4J Settings for log4j 1.2.x (via jakarta-commons-logging)
./apps/showcase/target/struts2-showcase/WEB-INF/classes/log4j.properties:# 
The five logging levels used by Log are (in order):
./apps/showcase/target/struts2-showcase/WEB-INF/src/java/log4j.properties:# 
Log4J Settings for log4j 1.2.x (via jakarta-commons-logging)
./apps/showcase/target/struts2-showcase/WEB-INF/src/java/log4j.properties:# 
The five logging levels used by Log are (in order):
./apps/showcase/target/classes/log4j.properties:# Log4J Settings for 
log4j 1.2.x (via jakarta-commons-logging)
./apps/showcase/target/classes/log4j.properties:# The five logging 
levels used by Log are (in order):
./apps/showcase/src/main/resources/log4j.properties:# Log4J Settings for 
log4j 1.2.x (via jakarta-commons-logging)
./apps/showcase/src/main/resources/log4j.properties:# The five logging 
levels used by Log are (in order):
[giaz@helen struts2]$

but I get only the same old log4j.properties that does not change the 
Struts2 logging
behavior.

Upon startup I get the logging configuration coming from xwork logging 
commons:

Feb 15, 2008 9:45:35 AM 
com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-default.xml]
Feb 15, 2008 9:45:35 AM 
com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-plugin.xml]
Feb 15, 2008 9:45:35 AM 
com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts.xml]

Is there any other means of configuration than just log4.properties? 
given this case that I do not use log4j?

TIA,
regards,
Giovanni

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


Re: tons of useless logging slowing my app down

Posted by Antonio Petrelli <an...@gmail.com>.
2008/2/15, Giovanni Azua <gi...@imc.nl>:
>
> My setup is:
> - Struts 2.1.x built from trunk
> - I import only commons.logging.jar and not log4j (is not allowed).



Well, if you don't use Log4J, then Commons Logging defaults to JDK
1.4logger. This link may help you:
http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/overview.html#1.8

Ciao
Antonio