Bug:4995 vAdd molude: nemo-tools and remove the depency of cliche repositoty.
[nemo.git] / nemo-tools / sandbox / src / main / java / org / opendaylight / nemo / tool / sandbox / CmdExecutor.java
index 592c82b1884f31ebba260304850628956276826e..c738f8fb9195e5a40708f707dcc523f224a72953 100644 (file)
@@ -17,11 +17,14 @@ import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Created by hj on 12/9/15.
  */
 public class CmdExecutor {
+    private static Logger log = LoggerFactory.getLogger(CmdExecutor.class);
     private static Connection sshConnection;
     private static String strHostName = Config.getHostName();
     private static String strUserName = Config.getHostUser();
@@ -37,7 +40,7 @@ public class CmdExecutor {
                 return true;
             }
         } catch (IOException objException) {
-            objException.printStackTrace();
+            log.error("Exceptions:",objException);
             if (null != sshConnection) {
                 sshConnection.close();
                 sshConnection = null;
@@ -75,7 +78,7 @@ public class CmdExecutor {
             return result;
 
         } catch (IOException objException) {
-            objException.printStackTrace();
+            log.error("Exceptions:",objException);
         } finally {
             if (null != session) {
                 session.close();