]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/CacheEntryBase.java
(refs #7071) User Logger instead of System.out/err.println
[simantics/platform.git] / bundles / org.simantics.db.impl / src / org / simantics / db / impl / query / CacheEntryBase.java
index 31b585aaeeccd43cb2089ebe254d680c314a709b..5776857d330ad98374d9b8c07d575ddb0118f7b2 100644 (file)
@@ -14,14 +14,17 @@ package org.simantics.db.impl.query;
 import java.util.ArrayList;
 import java.util.Iterator;
 
-import org.simantics.db.common.utils.Logger;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.impl.DebugPolicy;
 import org.simantics.db.impl.graph.ReadGraphImpl;
 import org.simantics.db.impl.procedure.InternalProcedure;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 abstract public class CacheEntryBase extends CacheEntry {
 
+    private static final Logger LOGGER = LoggerFactory.getLogger(CacheEntryBase.class);
+    
        // Default level is something that is not quite a prospect but still allows for ordering within CacheCollectionResult 
        public static final short UNDEFINED_LEVEL = 5;
        
@@ -108,7 +111,7 @@ abstract public class CacheEntryBase extends CacheEntry {
                statusOrException = EXCEPTED;
                result = t;
        } else {
-               Logger.defaultLogError("Cache entry got excepted status after being discarded: " + getClass().getSimpleName(), t);
+               LOGGER.warn("Cache entry got excepted status after being discarded: " + getClass().getSimpleName(), t);
                result = t;
        }
     }
@@ -139,7 +142,7 @@ abstract public class CacheEntryBase extends CacheEntry {
     final public boolean assertPending() {
        boolean result = isPending();
        if(!result) {
-               System.err.println("Assertion failed, expected pending, got " + statusOrException);
+               LOGGER.warn("Assertion failed, expected pending, got " + statusOrException);
        }
        return result;
     }