[jboss-cvs] JBossAS SVN: r57648 - projects/microcontainer/trunk/container/src/main/org/jboss/virtual/plugins/context

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 12 23:59:41 EDT 2006


Author: scott.stark at jboss.org
Date: 2006-10-12 23:59:39 -0400 (Thu, 12 Oct 2006)
New Revision: 57648

Modified:
   projects/microcontainer/trunk/container/src/main/org/jboss/virtual/plugins/context/AbstractVFSContext.java
Log:
Add trace level logging to the visit method

Modified: projects/microcontainer/trunk/container/src/main/org/jboss/virtual/plugins/context/AbstractVFSContext.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/virtual/plugins/context/AbstractVFSContext.java	2006-10-13 03:53:14 UTC (rev 57647)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/virtual/plugins/context/AbstractVFSContext.java	2006-10-13 03:59:39 UTC (rev 57648)
@@ -40,6 +40,7 @@
  * AbstractVFSContext.
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author Scott.Stark at jboss.org
  * @version $Revision: 1.1 $
  */
 public abstract class AbstractVFSContext implements VFSContext
@@ -153,6 +154,7 @@
          visitor.visit(handler);
       
       // Visit the children
+      boolean trace = log.isTraceEnabled();
       List<VirtualFileHandler> children;
       try
       {
@@ -162,7 +164,8 @@
       {
          if (ignoreErrors == false)
             throw e;
-         log.trace("Ignored: " + e);
+         if( trace )
+            log.trace("Ignored: " + e);
          return;
       }
       
@@ -171,15 +174,28 @@
       {
          // Ignore hidden if asked
          if (includeHidden == false && child.isHidden())
+         {
+            if( trace )
+               log.trace("Ignoring hidden file: "+child);
             continue;
+         }
          
          // Visit the leaf or non-leaves when asked
          boolean isLeaf = child.isLeaf();
          if (leavesOnly == false || isLeaf)
             visitor.visit(child);
+         else if( trace )
+         {
+            log.trace("Skipping non-leaf file: "+child);
+         }
 
          boolean allowArchives = true;
-         if (child.isArchive() && recurseArchives == false) allowArchives = false;
+         if (child.isArchive() && recurseArchives == false)
+         {
+            allowArchives = false;
+            if( trace )
+               log.trace("Won't scan archive: "+child);
+         }
 
          // Recurse when asked
          if (recurse && isLeaf == false && allowArchives)




More information about the jboss-cvs-commits mailing list