james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r471265 - /james/server/trunk/src/java/org/apache/james/util/connection/ServerConnection.java
Date Sat, 04 Nov 2006 21:25:14 GMT
Author: noel
Date: Sat Nov  4 13:25:13 2006
New Revision: 471265

URL: http://svn.apache.org/viewvc?view=rev&rev=471265
Log:
Two trivial changes: (1) add check for loglevel before formatting message, and (2) correct
loglevel check to match the logging statements.

Modified:
    james/server/trunk/src/java/org/apache/james/util/connection/ServerConnection.java

Modified: james/server/trunk/src/java/org/apache/james/util/connection/ServerConnection.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/util/connection/ServerConnection.java?view=diff&rev=471265&r1=471264&r2=471265
==============================================================================
--- james/server/trunk/src/java/org/apache/james/util/connection/ServerConnection.java (original)
+++ james/server/trunk/src/java/org/apache/james/util/connection/ServerConnection.java Sat
Nov  4 13:25:13 2006
@@ -346,7 +346,9 @@
                 Socket clientSocket = null;
                 try {
                     while (maxOpenConn > 0 && clientConnectionRunners.size() >=
maxOpenConn) {
-                        getLogger().warn("Maximum number of open connections (" +  clientConnectionRunners.size()
+ ") in use.");
+                        if (getLogger().isInfoEnabled()) {
+                            getLogger().info("Maximum number of open connections (" +  clientConnectionRunners.size()
+ ") in use.");
+                        }
                         synchronized (this) { wait(10000); }
                     }
 
@@ -372,7 +374,7 @@
                     if ((maxOpenConn > 0) && (clientConnectionRunners.size() >=
maxOpenConn)) {
                         if (getLogger().isWarnEnabled()) {
                            getLogger().warn("Maximum number of open connections exceeded
- refusing connection.  Current number of connections is " + clientConnectionRunners.size());
-                           if (getLogger().isWarnEnabled()) {
+                           if (getLogger().isInfoEnabled()) {
                                Iterator runnerIterator = clientConnectionRunners.iterator();
                                getLogger().info("Connections: ");
                                while( runnerIterator.hasNext() ) {



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message