title: How can i log my Java Console output to Log1.txt, Log2.txt etc?
body: <p>How can i log my Java Console output to Log1.txt, Log2.txt etc?
  Im currently using this code:</p>
  
  <pre><code>PrintStream out = new PrintStream(new FileOutputStream("output.txt"));
  
  System.setOut(out);
  </code></pre>
  
  <p>But this replaces the old log which I do not want. I want it to for example if there is a log1.txt I want it to log to log2.txt not replace log1.txt
  If anyone can help me out with this it would be GREAT!</p>