Using CommandSession console instead of System.* 
in AbstractShellCommand print and error

This fixes a bug where print() works intermittently
on the Linux servers and error() doesn't work at all.

fixes ONOS-986

Change-Id: I086fea9f999992990935d54a6d15d55a7fb4cfea
diff --git a/cli/src/main/java/org/onosproject/cli/AbstractShellCommand.java b/cli/src/main/java/org/onosproject/cli/AbstractShellCommand.java
index e6a62d0..b404db6 100644
--- a/cli/src/main/java/org/onosproject/cli/AbstractShellCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/AbstractShellCommand.java
@@ -62,7 +62,7 @@
      * @param args   arguments
      */
     public void print(String format, Object... args) {
-        System.out.println(String.format(format, args));
+        session.getConsole().println(String.format(format, args));
     }
 
     /**
@@ -72,7 +72,8 @@
      * @param args   arguments
      */
     public void error(String format, Object... args) {
-        System.err.println(String.format(format, args));
+        //FIXME we write both out and err to the same console (stdout)
+        session.getConsole().println(String.format(format, args));
     }
 
     /**