Brian O'Connor
Committed by Gerrit Code Review

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

This reverts commit ea9ae214.

The karaf shell explicitly depends on System.{out,err}, so piping to shell commands is broken by this patchset.

Change-Id: Ib7fb6341cfa42418115663413ea406173f5debf4
Note: When running as a service, if a thread that isn't the command thread calls print, it will go to $KARAF/var/System.out
......@@ -63,7 +63,7 @@ public abstract class AbstractShellCommand extends OsgiCommandSupport {
* @param args arguments
*/
public void print(String format, Object... args) {
session.getConsole().println(String.format(format, args));
System.out.println(String.format(format, args));
}
/**
......@@ -73,8 +73,7 @@ public abstract class AbstractShellCommand extends OsgiCommandSupport {
* @param args arguments
*/
public void error(String format, Object... args) {
//FIXME we write both out and err to the same console (stdout)
session.getConsole().println(String.format(format, args));
System.err.println(String.format(format, args));
}
/**
......