]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/console/AbstractCommandConsole.java
Replace System.err and System.out with SLF4J Logging
[simantics/platform.git] / bundles / org.simantics.scl.ui / src / org / simantics / scl / ui / console / AbstractCommandConsole.java
index a293eaee1008c97ddda906211c2be6a240e0d130..ab9e033d020cca6d2537c83a35020c976419a8a7 100644 (file)
@@ -43,6 +43,7 @@ import org.eclipse.swt.widgets.Sash;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.preferences.ScopedPreferenceStore;
 import org.simantics.scl.runtime.tuple.Tuple2;
+import org.slf4j.Logger;
 
 /**
  * A console with input and output area that can be embedded
@@ -519,8 +520,7 @@ public abstract class AbstractCommandConsole extends Composite {
                 range.start = 0;
                 range.length = 1;
                 input.setStyleRange(range);
-                System.err.println("The following error message didn't have a proper location:");
-                System.err.println(annotation.description);
+                getLogger().error("The following error message didn't have a proper location: {}", annotation.description, e);
             }
         }
     }
@@ -603,4 +603,5 @@ public abstract class AbstractCommandConsole extends Composite {
         }
     }
 
+    public abstract Logger getLogger();
 }