Here's an example of TeeOutputStream usage (keep outputting stdout & stderr) and printing it to file:
public static void main(String[] args) throws IOException {
System.setOut(new PrintStream(new TeeOutputStream(System.out, new PrintStream("boc-badge-manager"out.log"))));
System.setErr(new PrintStream(new TeeOutputStream(System.err, new PrintStream("boc-badge-manager"err.log"))));
...