]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.issues.common/src/org/simantics/issues/common/DependencyIssueValidator2.java
Replace System.err and System.out with SLF4J Logging
[simantics/platform.git] / bundles / org.simantics.issues.common / src / org / simantics / issues / common / DependencyIssueValidator2.java
index 68905e57dff42142a6eb8002d099c34d620fcef7..13e4961b30ff5b6edf6c411a011d2c053873733d 100644 (file)
@@ -64,7 +64,7 @@ public class DependencyIssueValidator2 extends ResourceRead3<Boolean> {
                        try {
                                @SuppressWarnings("unchecked")
                                Set<Issue> contexts = new HashSet<Issue>((List<Issue>)Functions.exec(graph, function, graph, resource2));
-                       if(DEBUG) System.err.println("Validator found: " + contexts.size() + " issues (" + contexts + ")");
+                       if(DEBUG) LOGGER.info("Validator found: " + contexts.size() + " issues (" + contexts + ")");
                        return contexts;
                        } catch (DatabaseException e) {
                                LOGGER.error("Reading a constraint validator failed", e);
@@ -83,21 +83,21 @@ public class DependencyIssueValidator2 extends ResourceRead3<Boolean> {
        @Override
        public Boolean perform(ReadGraph graph) throws DatabaseException {
                
-               if(DEBUG) System.err.println("Running DependencyValidator for " + NameUtils.getSafeName(graph, resource) + " " +  NameUtils.getSafeName(graph, resource3));
+               if(DEBUG) LOGGER.info("Running DependencyValidator for " + NameUtils.getSafeName(graph, resource) + " " +  NameUtils.getSafeName(graph, resource3));
 
                Set<Issue> existing = graph.syncRequest(new DependencyIssueDescriptions(resource3, resource), TransientCacheListener.<Set<Issue>>instance());
 
-        if(DEBUG) System.err.println("Existing: " + existing.size() + " issues (" + existing + ")");
+        if(DEBUG) LOGGER.info("Existing: " + existing.size() + " issues (" + existing + ")");
                
                // Removed resources do not have issues
                if(!graph.hasStatement(resource)) {
-               if(DEBUG) System.err.println("No statements");
+               if(DEBUG) LOGGER.info("No statements");
                        return existing.isEmpty();
                }
 
         Set<Issue> contexts = graph.syncRequest(new Contexts(resource3, resource), TransientCacheListener.<Set<Issue>>instance());
 
-        if(DEBUG) System.err.println("Current: " + contexts.size() + " issues (" + contexts + ")");
+        if(DEBUG) LOGGER.info("Current: " + contexts.size() + " issues (" + contexts + ")");
         
                return existing.equals(contexts);