Brian O'Connor
Committed by Gerrit Code Review

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
......@@ -62,7 +62,7 @@ public abstract class AbstractShellCommand extends OsgiCommandSupport {
* @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 @@ public abstract class AbstractShellCommand extends OsgiCommandSupport {
* @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));
}
/**
......