[jboss-cvs] JBossAS SVN: r74134 - projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/zip.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 5 06:54:47 EDT 2008


Author: alesj
Date: 2008-06-05 06:54:47 -0400 (Thu, 05 Jun 2008)
New Revision: 74134

Modified:
   projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/zip/ZipFileLockReaper.java
Log:
Reduce debug noise.

Modified: projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/zip/ZipFileLockReaper.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/zip/ZipFileLockReaper.java	2008-06-05 10:38:16 UTC (rev 74133)
+++ projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/zip/ZipFileLockReaper.java	2008-06-05 10:54:47 UTC (rev 74134)
@@ -96,7 +96,8 @@
          timer = new Timer("ZipFile Lock Reaper", true);
          timer.schedule(new ReaperTimerTask(), TIMER_PERIOD, TIMER_PERIOD);
       }
-      log.debug("Registered: " + w);
+      if (log.isTraceEnabled())
+         log.trace("Registered: " + w);
    }
 
    /**
@@ -109,7 +110,8 @@
       monitored.remove(w);
       monitoredCount--;
       lastUsed = System.currentTimeMillis();
-      log.debug("Unregistered: " + w);
+      if (log.isTraceEnabled())
+         log.trace("Unregistered: " + w);
    }
 
    /** Timer task that does the actual reaping */
@@ -117,8 +119,11 @@
    {
       public void run()
       {
-         log.debug("Timer called");
+         boolean trace = log.isTraceEnabled();
 
+         if (trace)
+            log.trace("Timer called");
+
          long now = System.currentTimeMillis();
          synchronized (ZipFileLockReaper.this)
          {
@@ -128,7 +133,8 @@
                {
                   timer.cancel();
                   timer = null;
-                  log.debug("Cancelled the timer");
+                  if (trace)
+                     log.trace("Cancelled the timer");
                }
                return;
             }
@@ -157,7 +163,8 @@
                try
                {
                   w.closeZipFile();
-                  log.debug("Asynchronously closed an unused ZipFile: " + w);
+                  if (log.isTraceEnabled())
+                     log.trace("Asynchronously closed an unused ZipFile: " + w);
                }
                catch(Exception ignored)
                {




More information about the jboss-cvs-commits mailing list