]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/references/ValRef.java
Replace System.err and System.out with SLF4J Logging
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / codegen / references / ValRef.java
index 85a613c437ba0a46263d8ef74d762a75ce29c1d3..954e8d0a3546ca07d2eb09b4ac284cd4e10726a4 100644 (file)
@@ -14,8 +14,11 @@ import org.simantics.scl.compiler.top.SCLCompilerConfiguration;
 import org.simantics.scl.compiler.types.TVar;
 import org.simantics.scl.compiler.types.Type;
 import org.simantics.scl.compiler.types.Types;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public final class ValRef implements IVal {
+    private static final Logger LOGGER = LoggerFactory.getLogger(ValRef.class);
     public static final ValRef[] EMPTY_ARRAY = new ValRef[0];
 
     Val binding;
@@ -55,8 +58,8 @@ public final class ValRef implements IVal {
             try {
                 binding.occurrence = next;
             } catch(NullPointerException e) {
-                System.err.println("removeModiId = " + removeModiId);
-                System.err.println("current ModiId = " + SSASimplificationContext.modiId);
+                LOGGER.error("removeModiId = " + removeModiId);
+                LOGGER.error("current ModiId = " + SSASimplificationContext.modiId, e);
                 throw new InternalCompilerError("The ValRef has already been removed.");
             }
         else