Solved

How to remove the debug statements generated by struts

Posted on 2006-11-16
8
633 Views
Last Modified: 2012-06-27
Hi,

  I am getting lot of debug statements in the weblogic server log . In my log4j.xml and properties files i have made the logging to ERROR level, then also i am getting lot of debug statements in the server log and the application log looks fine. These r the samples of debug statements i am getting


2006-11-15 09:28:43,767 [main] DEBUG org.apache.commons.beanutils.PropertyUtils - setSimpleProperty: Invoking method public void org.apache.struts.config.ActionConfig.setParameter(java.lang.String) with value list-64 (class java.lang.String)
2006-11-15 09:28:43,767 [main] DEBUG org.apache.commons.digester.Digester -   Fire begin() for SetNextRule[methodName=addActionConfig, paramType=org.apache.struts.config.ActionConfig]
2006-11-15 09:28:43,767 [main] DEBUG org.apache.commons.digester.Digester.sax - ignorableWhitespace(
                    )
2006-11-15 09:28:43,768 [main] DEBUG org.apache.commons.digester.Digester.sax - startElement(,forward,forward)
2006-11-15 09:28:43,768 [main] DEBUG org.apache.commons.digester.Digester -   Pushing body text ''
2006-11-15 09:28:43,768 [main] DEBUG org.apache.commons.digester.Digester -   New match='struts-config/action-mappings/action/forward'
2006-11-15 09:28:43,768 [main] DEBUG org.apache.commons.digester.Digester -   Fire begin() for FactoryCreateRule[className=null, attributeName=null, creationFactory=org.apache.struts.config.ActionForwardFactory@1f89e1]
2006-11-15 09:28:43,768 [main] DEBUG org.apache.commons.digester.Digester - [FactoryCreateRule]{struts-config/action-mappings/action/forward} New org.apache.struts.action.ActionForward
2006-11-15 09:28:43,768 [main] DEBUG org.apache.commons.digester.Digester -   Fire begin() for SetPropertiesRule[]
2006-11-15 09:28:43,768 [main] DEBUG org.apache.commons.digester.Digester - [SetPropertiesRule]{struts-config/action-mappings/action/forward} Setting property 'name' to 'list'
2006-11-15 09:28:43,768 [main] DEBUG org.apache.commons.digester.Digester - [SetPropertiesRule]{struts-config/action-mappings/action/forward} Setting property 'path' to '/jsp/approverequest/SearchAdminRequests.jsp'
2006-11-15 09:28:43,768 [main] DEBUG org.apache.commons.digester.Digester - [SetPropertiesRule]{struts-config/action-mappings/action/forward} Set org.apache.struts.action.ActionForward properties
2006-11-15 09:28:43,768 [main] DEBUG org.apache.commons.beanutils.BeanUtils - BeanUtils.populate(ForwardConfig[name=null,path=null,redirect=false,contextRelative=false,module=null], {path=/jsp/approverequest/SearchAdminRequests.jsp, name=list})
2006-11-15 09:28:43,769 [main] DEBUG org.apache.commons.beanutils.BeanUtils -   setProperty(ForwardConfig[name=null,path=null,redirect=false,contextRelative=false,module=null], path, /jsp/approverequest/SearchAdminRequests.jsp)
2006-11-15 09:28:43,769 [main] DEBUG org.apache.commons.beanutils.ConvertUtils - Convert string '/jsp/approverequest/SearchAdminRequests.jsp' to class 'java.lang.String'
2006-11-15 09:28:43,769 [main] DEBUG org.apache.commons.beanutils.ConvertUtils -   Using converter org.apache.commons.beanutils.converters.StringConverter@173bb48
2006-11-15 09:28:43,769 [main] DEBUG org.apache.commons.beanutils.PropertyUtils - setSimpleProperty: Invoking method public void org.apache.struts.config.ForwardConfig.setPath(java.lang.String) with value /jsp/approverequest/SearchAdminRequests.jsp (class java.lang.String)
2006-11-15 09:28:43,769 [main] DEBUG org.apache.commons.beanutils.BeanUtils -   setProperty(ForwardConfig[name=null,path=/jsp/approverequest/SearchAdminR

How to stop these debug statements which are getting generated
0
Comment
Question by:gocoool
  • 3
  • 2
8 Comments
 
LVL 92

Accepted Solution

by:
objects earned 225 total points
ID: 17960026
you still appear to have apache logging set at debug
0
 
LVL 23

Expert Comment

by:Ajay-Singh
ID: 17962101
you should set the logging level of the logger "org.apache.commons" to ERROR.
0
 

Author Comment

by:gocoool
ID: 17964955
Hi Ajay,objects,
 I have taken care of those things in my log4j.properties and log4j.xml... which i have attached respectively....Then also it is coming up.

log4j.category.org.apache.commons.digester.Digester=ERROR
log4j.category.org.apache.commons.digester.Digester.sax=ERROR
log4j.category.org.apache.commons.beanutils.PropertyUtils=ERROR
log4j.category.org.apache.commons.beanutils.BeanUtils=ERROR
log4j.category.org.apache.commons.beanutils.ConvertUtils=ERROR


<category name="org.apache.commons.digester.Digester">
              <priority value="ERROR" />
          <appender-ref ref="ARMFILE" />
    </category>
    <category name="org.apache.commons.digester.Digester.sax">
              <priority value="ERROR" />
          <appender-ref ref="ARMFILE" />
    </category>
    <category name="org.apache.commons.beanutils.PropertyUtils">
              <priority value="ERROR" />
          <appender-ref ref="ARMFILE" />
    </category>
    <category name="org.apache.commons.beanutils.BeanUtils">
              <priority value="ERROR" />
          <appender-ref ref="ARMFILE" />
    </category>
    <category name="org.apache.commons.beanutils.ConvertUtils">
              <priority value="ERROR" />
          <appender-ref ref="ARMFILE" />
    </category>

0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 23

Expert Comment

by:Ajay-Singh
ID: 17966828
You mean you have both log4j.properties and log4j.xml in the classpath?
0
 

Author Comment

by:gocoool
ID: 17968293

Ya ajay....  these files are included in the ear files we are building
0
 
LVL 23

Assisted Solution

by:Ajay-Singh
Ajay-Singh earned 225 total points
ID: 17970393
You need either log4j.properties or log4j.xml, NOT both. You can use the following log4j.xml file:

    <category name="org.apache.commons.digester">
             <priority value="ERROR" />
            <appender-ref ref="ARMFILE" />
    </category>
    <category name="org.apache.commons.beanutils">
             <priority value="ERROR" />
         <appender-ref ref="ARMFILE" />
    </category>


Since log categories are hieratical, you don't have to keep classwise loggers.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now