]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.acorn/src/org/simantics/acorn/lru/LRU.java
(refs #7071) User Logger instead of System.out/err.println
[simantics/platform.git] / bundles / org.simantics.acorn / src / org / simantics / acorn / lru / LRU.java
index 40dbad0397db0ac83639decc09f9661d022fc3a1..80fec7032940ac3e7a6a1abbebb02325880a8bfc 100644 (file)
@@ -16,16 +16,19 @@ import org.simantics.acorn.ClusterManager;
 import org.simantics.acorn.GraphClientImpl2;
 import org.simantics.acorn.exception.AcornAccessVerificationException;
 import org.simantics.acorn.exception.IllegalAcornStateException;
-import org.simantics.db.common.utils.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /*
  * The order rule of synchronization for LRU and LRUObject is:
- *   § Always lock LRUObject first!
+ *    Always lock LRUObject first!
  * 
  */
 
 public class LRU<MapKey,MapValue extends LRUObject<MapKey, MapValue>> {
-       
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(LRU.class); 
+    
        public static boolean VERIFY = true;
 
        final private long swapTime = 5L*1000000000L;
@@ -519,7 +522,7 @@ public class LRU<MapKey,MapValue extends LRUObject<MapKey, MapValue>> {
                            manager.notSafeToMakeSnapshot(new IllegalAcornStateException(t));
                        }
                        t.printStackTrace();
-                       Logger.defaultLogError(t);
+                       LOGGER.error("Exception happened in WriteRunnable.run", t);
                    }
                }
 
@@ -559,7 +562,7 @@ public class LRU<MapKey,MapValue extends LRUObject<MapKey, MapValue>> {
                         runWithMutex();
                         done = true;
                     } else {
-                        System.err.println("Retry mutex acquire");
+                        LOGGER.warn("Retry mutex acquire");
                         gotMutex = impl.tryAcquireMutex();
                     }