openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r917657 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
Date Mon, 01 Mar 2010 19:16:23 GMT
Author: ppoddar
Date: Mon Mar  1 19:16:22 2010
New Revision: 917657

URL: http://svn.apache.org/viewvc?rev=917657&view=rev
Log:
OPENJPA-1543: Remove fragmented messages. Change to TRACE level logging.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java?rev=917657&r1=917656&r2=917657&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryCacheImpl.java
Mon Mar  1 19:16:22 2010
@@ -109,8 +109,8 @@
 		try {
 			String id = q.getIdentifier();
 			if (isCachable(id) == Boolean.FALSE) {
-				if (_log != null && _log.isWarnEnabled())
-                    _log.warn(_loc.get("prepared-query-not-cachable", id));
+				if (_log != null && _log.isTraceEnabled())
+                    _log.trace(_loc.get("prepared-query-not-cachable", id));
 				return false;
 			}
 			Exclusion exclusion = getMatchedExclusionPattern(id);
@@ -143,8 +143,8 @@
 	public boolean invalidate(String id) {
 		lock();
 		try {
-			if (_log != null && _log.isInfoEnabled())
-                _log.info(_loc.get("prepared-query-invalidate", id));
+			if (_log != null && _log.isTraceEnabled())
+                _log.trace(_loc.get("prepared-query-invalidate", id));
 			return _delegate.remove(id) != null;
 		} finally {
 			unlock();
@@ -177,8 +177,8 @@
 		lock();
 		try {
 			if (_uncachables.put(id, exclusion) == null) {
-			    if (_log != null && _log.isInfoEnabled()) 
-			        _log.info(_loc.get("prepared-query-uncache", id, exclusion));
+			    if (_log != null && _log.isTraceEnabled()) 
+			        _log.trace(_loc.get("prepared-query-uncache", id, exclusion));
 			}
 			return _delegate.remove(id);
 		} finally {
@@ -240,8 +240,8 @@
             Collection<String> reborns = getMatchedKeys(pattern, _uncachables);
 			for (String rebornKey : reborns) {
                 _uncachables.remove(rebornKey);
-	            if (_log != null && _log.isInfoEnabled())
-	                _log.info(_loc.get("prepared-query-remove-pattern", pattern, rebornKey));
+	            if (_log != null && _log.isTraceEnabled())
+	                _log.trace(_loc.get("prepared-query-remove-pattern", pattern, rebornKey));
 			}
 		} finally {
 			unlock();
@@ -342,11 +342,11 @@
         private static String STRONG = _loc.get("strong-exclusion").getMessage();
         private static String WEAK   = _loc.get("weak-exclusion").getMessage();
         
-        public ExclusionPattern(boolean _strong, String _pattern, String _reason) {
+        public ExclusionPattern(boolean strong, String pattern, String reason) {
             super();
-            this._strong = _strong;
-            this._pattern = _pattern;
-            this._reason = _reason;
+            this._strong = strong;
+            this._pattern = pattern;
+            this._reason = reason;
         }
 
         public String getPattern() {
@@ -387,7 +387,7 @@
         
         public String toString() {
             StringBuilder buf = new StringBuilder();
-            buf.append(_strong ? STRONG : WEAK);
+            buf.append(" ").append(_strong ? STRONG : WEAK).append(". ");
             if (_reason != null)
                 buf.append(_reason);
             return buf.toString();



Mime
View raw message