]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/src/org/simantics/modeling/UserComponentMigration.java
Replace System.err and System.out with SLF4J Logging
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / UserComponentMigration.java
index be480be4785357e632310940c2d9948d860be4a5..928c405b5a5cb6e88d1eb4ab42ed6896e804d982 100644 (file)
@@ -45,6 +45,8 @@ import org.simantics.utils.datastructures.MapList;
 import org.simantics.utils.datastructures.Pair;
 import org.simantics.utils.datastructures.Triple;
 import org.simantics.utils.strings.AlphanumComparator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import gnu.trove.set.hash.THashSet;
 
@@ -54,6 +56,8 @@ import gnu.trove.set.hash.THashSet;
  */
 public class UserComponentMigration {
 
+    private static final Logger LOGGER = LoggerFactory.getLogger(UserComponentMigration.class);
+
     public static void migrateUserComponents(WriteGraph graph, Resource source, Resource target, Collection<Resource> components) throws DatabaseException {
         MigrateModel model = getComponentTypeModel(graph, source, target, null);
         if (model.instances.isEmpty())
@@ -206,7 +210,7 @@ public class UserComponentMigration {
             Resource type = graph.getPossibleType(instance, STR.Component);
             String uri = graph.getPossibleURI(instance);
             if (type == null || uri == null) {
-                System.err.println("CANNOT MIGRATE INSTANCE DUE TO TYPING PROBLEM: " + NameUtils.getURIOrSafeNameInternal(graph, instance));
+                LOGGER.warn("CANNOT MIGRATE INSTANCE DUE TO TYPING PROBLEM: " + NameUtils.getURIOrSafeNameInternal(graph, instance));
                 continue;
             }
             NamedResource best = matchBest(graph, type, targetOntology);