Solved

How to remove the debug statements generated by struts

Posted on 2006-11-16
8
679 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

821 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