You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Veera Sivakumar <vs...@rm.com> on 2004/07/09 10:01:32 UTC

how to disable struts connection pooling logs

Hi,
I have web application developed on struts 1.1 , deployed on Tomcat 4.1.
We use Postgres as backend database. We also use Struts connection pooling mechanism.
The problem I am facing is the following entries in the stderr.log file.
 
Jul 9, 2004 9:13:59 AM org.apache.struts.legacy.GenericDataSource getConnection
INFO:   getConnection()
Jul 9, 2004 9:13:59 AM org.apache.struts.legacy.GenericDataSource getConnection
INFO:    Check for timeout, activeCount=2, useCount=0
Jul 9, 2004 9:13:59 AM org.apache.struts.legacy.GenericDataSource getConnection
INFO:    Found available connection
Jul 9, 2004 9:13:59 AM org.apache.struts.legacy.GenericDataSource getConnection
INFO:    Return allocated connection, activeCount=2, useCount=1
Jul 9, 2004 9:13:59 AM org.apache.struts.legacy.GenericDataSource returnConnection
INFO:   releaseConnection(), activeCount=2, useCount=0

 
My  log file is getting filled with these entries quickly. 
I want the above logs not to be written in the log file.
I have kept the debug option '0' in server.xml for my app ..
 
<Context path="/qca" docBase="qca" debug="0" swallowOutput="true">
 
Also, I have modified my web.xml for my app to set the debug=0
 
<servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value>qca.aps.resources.ApplicationResources</param-value>
    </init-param>
    
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>0</param-value>
    </init-param>
 
I am still getting these logs in my log file. Can any one help me what else I have to set to stop these connection pooling entries in log file.
 
Thanks in advance
 
Shiva
 
Visit our website at http://www.rm.com

This message is confidential.  You should not copy it
or disclose its contents to anyone.  You may use and apply the information
only for the intended purpose.  Internet communications are not secure and
therefore RM does not accept legal responsibility for the contents of this
message.  Any views or opinions presented are only those of the author and
not those of RM.  If this email has come to you in error please delete it
and any attachments.  Please note that RM may intercept incoming and
outgoing e-mail communications.

This email has been scanned for viruses by Trend ScanMail.

Re: how to disable struts connection pooling logs

Posted by Duncan Mills <du...@oracle.com>.
Veera, you need to configure commons logging  to control these INFO 
messages:  I've documented what to do in a short article:
http://otn.oracle.com/products/jdev/tips/mills/Struts-logging.html

Regards

Duncan Mills
http://www.groundside.com/blog



Veera Sivakumar wrote:

>Hi,
>I have web application developed on struts 1.1 , deployed on Tomcat 4.1.
>We use Postgres as backend database. We also use Struts connection pooling mechanism.
>The problem I am facing is the following entries in the stderr.log file.
> 
>Jul 9, 2004 9:13:59 AM org.apache.struts.legacy.GenericDataSource getConnection
>INFO:   getConnection()
>Jul 9, 2004 9:13:59 AM org.apache.struts.legacy.GenericDataSource getConnection
>INFO:    Check for timeout, activeCount=2, useCount=0
>Jul 9, 2004 9:13:59 AM org.apache.struts.legacy.GenericDataSource getConnection
>INFO:    Found available connection
>Jul 9, 2004 9:13:59 AM org.apache.struts.legacy.GenericDataSource getConnection
>INFO:    Return allocated connection, activeCount=2, useCount=1
>Jul 9, 2004 9:13:59 AM org.apache.struts.legacy.GenericDataSource returnConnection
>INFO:   releaseConnection(), activeCount=2, useCount=0
>
> 
>My  log file is getting filled with these entries quickly. 
>I want the above logs not to be written in the log file.
>I have kept the debug option '0' in server.xml for my app ..
> 
><Context path="/qca" docBase="qca" debug="0" swallowOutput="true">
> 
>Also, I have modified my web.xml for my app to set the debug=0
> 
><servlet>
>    <servlet-name>action</servlet-name>
>    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>    <init-param>
>      <param-name>application</param-name>
>      <param-value>qca.aps.resources.ApplicationResources</param-value>
>    </init-param>
>    
>    <init-param>
>      <param-name>config</param-name>
>      <param-value>/WEB-INF/struts-config.xml</param-value>
>    </init-param>
>    <init-param>
>      <param-name>debug</param-name>
>      <param-value>0</param-value>
>    </init-param>
>    <init-param>
>      <param-name>detail</param-name>
>      <param-value>0</param-value>
>    </init-param>
> 
>I am still getting these logs in my log file. Can any one help me what else I have to set to stop these connection pooling entries in log file.
> 
>Thanks in advance
> 
>Shiva
> 
>Visit our website at http://www.rm.com
>
>This message is confidential.  You should not copy it
>or disclose its contents to anyone.  You may use and apply the information
>only for the intended purpose.  Internet communications are not secure and
>therefore RM does not accept legal responsibility for the contents of this
>message.  Any views or opinions presented are only those of the author and
>not those of RM.  If this email has come to you in error please delete it
>and any attachments.  Please note that RM may intercept incoming and
>outgoing e-mail communications.
>
>This email has been scanned for viruses by Trend ScanMail.
>
>  
>

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