I am trying to create a print stream class and store the errors/console in there, so when errors pop up they are stored in the printstream.
This is because I want to send any errors to a server when they appear. I have code working in eclipse for when an error appears it is stored in the print stream and sent to a server. However when I import it over using a library I made or just copying the code it doesn’t store the console in the print streams.
Does processing have an issue with print streams and byte stream array outputs?
An example of the code I am trying to use:
ByteArrayOutputStream byteArray = new ByteArrayOutputStream(); PrintStream printS = new PrintStream(byteArray); System.setErr(pst); String tester = byteArray.toString(StandardCharsets.UTF_8);