]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.common/src/org/simantics/db/common/uri/UnescapedChildMapOfResource.java
Utilize slf4j
[simantics/platform.git] / bundles / org.simantics.db.common / src / org / simantics / db / common / uri / UnescapedChildMapOfResource.java
index 303afddd00da0dbdc657891f45282c2eb09b0665..a3743f6377a46274d170cc473f28a2c50c943468 100644 (file)
@@ -22,9 +22,13 @@ import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.service.CollectionSupport;\r
 import org.simantics.layer0.Layer0;\r
 import org.simantics.utils.Development;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
 \r
 public class UnescapedChildMapOfResource extends ResourceRead<Map<String, Resource>> {\r
 \r
+    private static final Logger LOGGER = LoggerFactory.getLogger(UnescapedChildMapOfResource.class);\r
+\r
        public UnescapedChildMapOfResource(Resource resource) {\r
            super(resource);\r
        }\r
@@ -40,10 +44,10 @@ public class UnescapedChildMapOfResource extends ResourceRead<Map<String, Resour
                if(name != null) {\r
                    Resource old = result.put(name, r);\r
                    if (old != null)\r
-                       System.err.println(this + ": The database contains siblings with the same name " + name + " (resource=$" + resource.getResourceId() + ", child=$" + r.getResourceId() + ", previous child=$" + old.getResourceId() + ").");\r
+                       LOGGER.error("The database contains siblings with the same name " + name + " (resource=$" + resource.getResourceId() + ", child=$" + r.getResourceId() + ", previous child=$" + old.getResourceId() + ").");\r
                } else {\r
                        if(Development.DEVELOPMENT)\r
-                           System.err.println(this + ": The database contains a child with no unique name (resource=$" + resource.getResourceId() + ", child=$" + r.getResourceId() + ").");\r
+                           LOGGER.error("The database contains a child with no unique name (resource=$" + resource.getResourceId() + ", child=$" + r.getResourceId() + ").");\r
                }\r
            }\r
            return result;\r