]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.ui/src/org/simantics/ui/workbench/WorkbenchShutdownServiceImpl.java
Replace System.err and System.out with SLF4J Logging
[simantics/platform.git] / bundles / org.simantics.ui / src / org / simantics / ui / workbench / WorkbenchShutdownServiceImpl.java
index 6a1b2c027165154ffdd23f6e031c52589fe14427..9cba52a3713a77faf198284cca2b614f689c576b 100644 (file)
@@ -17,12 +17,15 @@ import java.util.List;
 
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @author Tuukka Lehtonen
  */
 public class WorkbenchShutdownServiceImpl implements WorkbenchShutdownService {
 
+    private static final Logger LOGGER = LoggerFactory.getLogger(WorkbenchShutdownServiceImpl.class);
     private static ServiceRegistration service = null;
 
     private final List<Runnable>       hooks   = new ArrayList<Runnable>();
@@ -72,8 +75,7 @@ public class WorkbenchShutdownServiceImpl implements WorkbenchShutdownService {
     }
 
     protected void handleException(Object source, Throwable t) {
-        System.err.println(getClass().getSimpleName() + ": workbench shutdown hook " + source + " caused unexpected exception:");
-        t.printStackTrace();
+        LOGGER.error(getClass().getSimpleName() + ": workbench shutdown hook " + source + " caused unexpected exception:", t);
     }
 
 }