static void logOutputPlain() { set(getJavaX(), "customSystemOut", new Appendable() { File logFile = getProgramFile("output.txt"); // only using this one public Appendable append(CharSequence cs) { appendToTextFile(logFile, cs.toString()); return this; } public Appendable append(char c) { return this; } public Appendable append(CharSequence s, int start, int end) { return this; } }); }