code: public static synchronized ThreadBoundOutputStream bindSystemErr() {
          if (null== boundErrPrint) {
              origSystemErr = System.err;
              final ThreadBoundOutputStream newErr = new ThreadBoundOutputStream(origSystemErr);
              boundErrPrint = new ThreadBoundPrintStream(newErr);
              System.setErr(boundErrPrint);
              return newErr;
          } else {
              return boundErrPrint.getThreadBoundOutputStream();
          }
      }
docs: Bind the System.err PrintStream to a ThreadBoundOutputStream and return it. If System.err is already bound,
  returns the pre-bound ThreadBoundOutputStream. The binding can be removed with {@link #unbindSystemErr()}.
  
  @return A ThreadBoundOutputStream bound to System.err