You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by mu...@apache.org on 2009/07/15 00:24:56 UTC

svn commit: r794094 - /struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java

Author: musachy
Date: Tue Jul 14 22:24:56 2009
New Revision: 794094

URL: http://svn.apache.org/viewvc?rev=794094&view=rev
Log:
add some logging to class reloading

Modified:
    struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java

Modified: struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java?rev=794094&r1=794093&r2=794094&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java (original)
+++ struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java Tue Jul 14 22:24:56 2009
@@ -178,16 +178,22 @@
     }
 
     public void onDirectoryCreate(File file) {
-        if (classLoader != null)
+        if (classLoader != null) {
+            if (LOG.isDebugEnabled())
+                LOG.debug("Change detected in file [#0], reloading class loader", file.getAbsolutePath());
             classLoader.reload();
+        }
     }
 
     public void onDirectoryDelete(File file) {
     }
 
     public void onFileChange(File file) {
-        if (classLoader != null)
+        if (classLoader != null) {
+            if (LOG.isDebugEnabled())
+                LOG.debug("Change detected in file [#0], reloading class loader", file.getAbsolutePath());
             classLoader.reload();
+        }
     }
 
     public void onFileCreate(File file) {