Is it possible to create a custom format for System.setOut.
I want to write everything that comes in the console to a file. So far i'm able to write to a file but is it possible to put it in a format so i have a more organized log file.
This is what i have to write to the file.
This is my formatter, i've used it before with a filehandler.
Is it possible to use this one here too or is it even possible to create another layout for System.setOut
So then just changing where the output goes isn't going to be a solution at all. You actually want to intercept the output and reformat it.
But frankly I wouldn't do that. I would just go through the existing code, find all of the places which use System.out, and modify them to use a proper logging system. (Of which there are plenty, readily available.) Otherwise you'll find yourself writing your own logging system, and rewriting basic Java components is a programming sin.