incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r904007 - in /sling/trunk/installer/jcr/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/impl: FolderNameFilter.java JcrInstaller.java
Date Thu, 28 Jan 2010 09:14:40 GMT
Author: bdelacretaz
Date: Thu Jan 28 09:14:39 2010
New Revision: 904007

URL: http://svn.apache.org/viewvc?rev=904007&view=rev
Log:
SLING-1334 - jcrinstall should log folder priority values for troubleshooting

Modified:
    sling/trunk/installer/jcr/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/impl/FolderNameFilter.java
    sling/trunk/installer/jcr/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/impl/JcrInstaller.java

Modified: sling/trunk/installer/jcr/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/impl/FolderNameFilter.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/jcr/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/impl/FolderNameFilter.java?rev=904007&r1=904006&r2=904007&view=diff
==============================================================================
--- sling/trunk/installer/jcr/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/impl/FolderNameFilter.java
(original)
+++ sling/trunk/installer/jcr/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/impl/FolderNameFilter.java
Thu Jan 28 09:14:39 2010
@@ -98,6 +98,7 @@
      */
     int getPriority(final String path) {
     	int result = 0;
+    	List<String> modes = null;
     	
         // If path contains dots after the last /, remove suffixes 
     	// starting with dots until path matches regexp, and accept 
@@ -112,7 +113,7 @@
         }
         if(prefix.indexOf(DOT) > 0) {
             int pos = 0;
-            final List<String> modes = new LinkedList<String>();
+            modes = new LinkedList<String>();
             while( (pos = prefix.lastIndexOf(DOT)) >= 0) {
                 modes.add(prefix.substring(pos + 1));
                 prefix = prefix.substring(0, pos);
@@ -135,13 +136,18 @@
                 }
             }
             
-            if(log.isDebugEnabled()) {
-                log.debug("accept(" + path + ")=" + result + " (prefix=" + prefix + ", modes="
+ modes + ")");
-            }
-            
         } else if(pattern.matcher(path).matches()) {
         	result = getRootPriority(path);
         }
+        
+        if(modes != null) {
+            if(log.isDebugEnabled()) {
+                log.debug("getPriority(" + path + ")=" + result + " (prefix=" + prefix +
", run modes=" + modes + ")");
+            }
+        } else {
+        	log.debug("getPriority({})={}", path, result);
+        }
+        
         return result;
     }
     

Modified: sling/trunk/installer/jcr/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/impl/JcrInstaller.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/jcr/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/impl/JcrInstaller.java?rev=904007&r1=904006&r2=904007&view=diff
==============================================================================
--- sling/trunk/installer/jcr/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/impl/JcrInstaller.java
(original)
+++ sling/trunk/installer/jcr/jcrinstall/src/main/java/org/apache/sling/jcr/jcrinstall/impl/JcrInstaller.java
Thu Jan 28 09:14:39 2010
@@ -331,7 +331,7 @@
         }
         final int depth = path.split("/").length;
         if(depth > maxWatchedFolderDepth) {
-            log.info("Not recursing into {} due to maxWatchedFolderDepth={}", path, maxWatchedFolderDepth);
+            log.debug("Not recursing into {} due to maxWatchedFolderDepth={}", path, maxWatchedFolderDepth);
             return;
         }
         final NodeIterator it = n.getNodes();



Mime
View raw message