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