public PrintWriter setTarget(final PrintWriter printWriter, final long targetLength) {
    synchronized (this) {
      PrintWriter oldPrintWriter = this.printWriter;
      bytesLogged = targetLength;
      this.printWriter = printWriter;
      return oldPrintWriter;
    }
  }
Sets the target that this logger will sends its output to.

@return the previous target.
geode-core/src/main/java/org/apache/geode/internal/logging/PureLogWriter.java