]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterInfo.java
Replace System.err and System.out with SLF4J Logging
[simantics/platform.git] / bundles / org.simantics.acorn / src / org / simantics / acorn / lru / ClusterInfo.java
index f20b384569d2c9893e7a3999756cd3308409ab2b..54689394d2e894e30ea0139fbed4aa78dfff237c 100644 (file)
@@ -20,9 +20,12 @@ import org.simantics.db.exception.SDBException;
 import org.simantics.db.service.Bytes;
 import org.simantics.db.service.ClusterUID;
 import org.simantics.utils.datastructures.Pair;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ClusterInfo extends LRUObject<ClusterUID, ClusterInfo> implements Persistable {
-       
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(ClusterInfo.class);
        final private ClusterManager manager;
        private ClusterImpl cluster;
        public int changeSetId;
@@ -328,7 +331,8 @@ public class ClusterInfo extends LRUObject<ClusterUID, ClusterInfo> implements P
                        long start = System.nanoTime();
                        state.waitForUpdates();
                        long duration = System.nanoTime() - start;
-                       System.err.println("Wait updates to cluster " + getKey() + " for " + (1e-6 * duration) + "ms.");
+                       if (LOGGER.isDebugEnabled())
+                           LOGGER.debug("Wait updates to cluster " + getKey() + " for " + (1e-6 * duration) + "ms.");
                }
        }
        
@@ -336,5 +340,9 @@ public class ClusterInfo extends LRUObject<ClusterUID, ClusterInfo> implements P
        protected boolean overwrite() {
                return true;
        }
-       
+
+       @Override
+       public Logger getLogger() {
+           return LOGGER;
+       }
 }
\ No newline at end of file