code: public static synchronized ThreadBoundOutputStream bindSystemOut() {
          if (null== boundOutPrint) {
              origSystemOut = System.out;
              final ThreadBoundOutputStream boundOut = new ThreadBoundOutputStream(origSystemOut);
              boundOutPrint = new ThreadBoundPrintStream(boundOut);
              System.setOut(boundOutPrint);
              return boundOut;
          } else {
              return boundOutPrint.getThreadBoundOutputStream();
          }
      }
docs: Bind the System.out PrintStream to a ThreadBoundOutputStream and return it. If System.out is already bound,
  returns the pre-bound ThreadBoundOutputStream. The binding can be removed with {@link #unbindSystemOut()}.
  
  @return A ThreadBoundOutputStream bound to System.out