[PATCH 2 of 4] Change database connection debug output to traces

Wald Commits scm-commit at wald.intevation.org
Fri Apr 24 16:02:54 CEST 2015


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1429872355 -7200
# Node ID d718edbf0b0c9c57db5c3a9a942639f8722f335b
# Parent  f0ea2063b58ea02dbbc63ef3e5f0f8f870fd0377
Change database connection debug output to traces

diff -r f0ea2063b58e -r d718edbf0b0c backend/src/main/java/org/dive4elements/river/backend/utils/DBCPConnectionProvider.java
--- a/backend/src/main/java/org/dive4elements/river/backend/utils/DBCPConnectionProvider.java	Wed Apr 15 17:22:02 2015 +0200
+++ b/backend/src/main/java/org/dive4elements/river/backend/utils/DBCPConnectionProvider.java	Fri Apr 24 12:45:55 2015 +0200
@@ -253,20 +253,20 @@
     }
 
     public Connection getConnection() throws SQLException {
-        log.debug("Connection pool parameters:");
-        log.debug("_ active connections: " + ds.getNumActive());
-        log.debug("_ idle connections: " + ds.getNumIdle());
-        log.debug("_ max active: " + ds.getMaxActive());
+        log.trace("Connection pool parameters:");
+        log.trace("_ active connections: " + ds.getNumActive());
+        log.trace("_ idle connections: " + ds.getNumIdle());
+        log.trace("_ max active: " + ds.getMaxActive());
         if (ds.getNumActive() == ds.getMaxActive()) {
             log.warn("Maximum number of database connections in pool in use!");
         }
         Connection conn = ds.getConnection();
-        log.debug("Return connection with hash: " + conn.hashCode());
+        log.trace("Return connection with hash: " + conn.hashCode());
         return conn;
     }
 
     public void closeConnection(Connection conn) throws SQLException {
-        log.debug("Close connection with hash: " + conn.hashCode());
+        log.trace("Close connection with hash: " + conn.hashCode());
         conn.close();
     }
 


More information about the Dive4Elements-commits mailing list