]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.acorn/src/org/simantics/acorn/lru/LRUObject.java
Replace System.err and System.out with SLF4J Logging
[simantics/platform.git] / bundles / org.simantics.acorn / src / org / simantics / acorn / lru / LRUObject.java
index 508c951067dedc3df895d938b3a0e84f9dda771c..a84a281089c289de2dbad32cd5dce6db359453ea 100644 (file)
@@ -10,9 +10,11 @@ import org.simantics.acorn.Persistable;
 import org.simantics.acorn.exception.AcornAccessVerificationException;
 import org.simantics.acorn.exception.IllegalAcornStateException;
 import org.simantics.utils.datastructures.Pair;
 import org.simantics.acorn.exception.AcornAccessVerificationException;
 import org.simantics.acorn.exception.IllegalAcornStateException;
 import org.simantics.utils.datastructures.Pair;
+import org.slf4j.Logger;
 
 public abstract class LRUObject<MapKey, MapValue extends LRUObject<MapKey, MapValue>> implements Persistable {
 
 public abstract class LRUObject<MapKey, MapValue extends LRUObject<MapKey, MapValue>> implements Persistable {
-       
+
+    public abstract Logger getLogger();
        public static boolean VERIFY = true;
        
        // Final stuff
        public static boolean VERIFY = true;
        
        // Final stuff
@@ -64,7 +66,7 @@ public abstract class LRUObject<MapKey, MapValue extends LRUObject<MapKey, MapVa
        public void acquireMutex() throws IllegalAcornStateException {
                try {
                        while(!mutex.tryAcquire(3, TimeUnit.SECONDS)) {
        public void acquireMutex() throws IllegalAcornStateException {
                try {
                        while(!mutex.tryAcquire(3, TimeUnit.SECONDS)) {
-                               System.err.println("Mutex is taking a long time to acquire - owner is " + mutexOwner);
+                               getLogger().info("Mutex is taking a long time to acquire - owner is " + mutexOwner);
                        }
                        
                        if(VERIFY)
                        }
                        
                        if(VERIFY)