Console buffer length

Hi, how do you increase the length of the console buffer ? Mine only stores about 500 lines and then they are lost. Can’t see anything in settings.

I’d rather recommend to fill a String array and store it with
saveStrings or write it in a box on the screen

2 Likes

An easier way would simply redirect output to a file. This sketch starts with console output but will change to a file if you hit the ‘o’ key and back to console with the ‘c’ key.

import java.io.*;

PrintStream o, console;

void setup() {
  size(320, 240);
  console = System.out;
  try {
    o = new PrintStream(sketchPath("") + new File("a.txt"));
  }
  catch(Exception e) {
    System.err.println("Unable to create file output stream");
  }
  System.setOut(console);
}

void draw() {
  background(200, 200, 255);
  if (frameCount % 50 == 0)
    println(frameCount);
}

void keyTyped() {
  if (key == 'c')
    System.setOut(console);
  else if (key == 'o')
    System.setOut(o);
}
5 Likes

Adding to the topic…

Another option is to send data out the serial port to a serial terminal of your choice; this can be done with virtual COM ports and a local bridge.

A virtual serial port driver is available here:
https://www.hhdsoftware.com/

Free version:

Use any serial terminal of your choice:
https://learn.sparkfun.com/tutorials/terminal-basics/real-term-windows
Above link is NOT a complete list.

Most serial terminals providing logging.

With a virtual serial port you can send data from Processing to the terminal software and use that for logging.

Great for working with serial communication locally as well!

Similar can be done with the networking tools:

:)