@@ -0,0 +1,2610 @@
+package me.drton.jmavsim;%0A%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.OutputStream;%0Aimport java.io.PrintStream;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class SystemOutHandler %7B%0A    private PrintStream osPrintStream;%0A    private SystemOutHandlerOutputStream os;%0A    private boolean active;%0A    private boolean logToStdOut;%0A%0A    public SystemOutHandler(boolean logToStdOut) %7B%0A        this.active = false;%0A        this.logToStdOut = logToStdOut;%0A        this.osPrintStream = System.out;%0A        this.os = new SystemOutHandlerOutputStream(new ArrayList%3COutputStream%3E(1));%0A    %7D%0A    %0A    public void setLogToStdOut(boolean logToStdOut) %7B%0A        this.logToStdOut = logToStdOut;%0A    %7D%0A%0A    public void addOutputStream(OutputStream os) %7B%0A        this.os.addStream(os);%0A    %7D%0A%0A    public void removeOutputStream(OutputStream os) %7B%0A        this.os.removeStream(os);%0A    %7D%0A    %0A    public void start(boolean clearStreams) %7B%0A        if (this.active)%0A            return;%0A%0A        this.active = true;%0A        if (clearStreams)%0A            os.clearStreams();%0A        if (this.logToStdOut)%0A            os.addStream(this.osPrintStream);%0A%0A        System.setOut(new PrintStream(this.os));%0A    %7D%0A%0A    public void stop() %7B%0A        this.active = false;%0A        System.setOut(osPrintStream);%0A    %7D%0A%0A    private static class SystemOutHandlerOutputStream extends OutputStream %7B%0A        private List%3COutputStream%3E outputStreams;%0A%0A        public SystemOutHandlerOutputStream(List%3COutputStream%3E outputStreams) %7B%0A            this.outputStreams = outputStreams;%0A        %7D%0A        %0A        public void addStream(OutputStream os) %7B%0A            if (!this.outputStreams.contains(os))%0A                this.outputStreams.add(os);%0A        %7D%0A%0A        public void removeStream(OutputStream os) %7B%0A            if (this.outputStreams.contains(os))%0A                this.outputStreams.remove(os);%0A        %7D%0A        %0A        public void clearStreams() %7B%0A            this.outputStreams.clear();%0A        %7D%0A%0A        public void write(int b) throws IOException %7B%0A            for (OutputStream os : this.outputStreams) %7B%0A                if (os != null)%0A                    os.write(b);%0A            %7D%0A        %7D%0A%0A        public void flush() throws IOException %7B%0A            for (OutputStream os : this.outputStreams) %7B%0A                if (os != null)%0A                    os.flush();%0A            %7D%0A        %7D%0A%0A        public void close() throws IOException %7B%0A            for (OutputStream os : outputStreams) %7B%0A                if (os != null)%0A                    os.close();%0A            %7D%0A        %7D%0A    %7D%0A%7D

Add SystemOutHandler class for proxying System.out messages.