geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r502831 - /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/LazyProxy.groovy
Date Sat, 03 Feb 2007 01:38:00 GMT
Author: jdillon
Date: Fri Feb  2 17:38:00 2007
New Revision: 502831

URL: http://svn.apache.org/viewvc?view=rev&rev=502831
Log:
Setup logging, and added trace logs when we load or re-load

Modified:
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/LazyProxy.groovy

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/LazyProxy.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/LazyProxy.groovy?view=diff&rev=502831&r1=502830&r2=502831
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/LazyProxy.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/LazyProxy.groovy
Fri Feb  2 17:38:00 2007
@@ -25,6 +25,9 @@
 
 import java.lang.ref.SoftReference
 
+import org.apache.commons.logging.Log
+import org.apache.commons.logging.LogFactory
+
 /**
  * A lazy loading proxy, uses a closure to initialize the target and
  * binds the target to a soft-reference to be heap friendly.
@@ -36,6 +39,8 @@
     //       have the magic going on...
     //
     
+    private static Log log = LogFactory.getLog(this)
+    
     private Closure factory
     
     private SoftReference reference
@@ -54,6 +59,11 @@
             if (obj) {
                 return obj
             }
+            
+            log.trace('Re-loading target')
+        }
+        else {
+            log.trace('Loading target')
         }
         
         obj = factory.call()



Mime
View raw message