private static void formatText(PrintWriter writer, String target, int maxLength,
      int initialLength) {
    BreakIterator boundary = BreakIterator.getLineInstance();
    boundary.setText(target);
    int start = boundary.first();
    int end = boundary.next();
    int lineLength = initialLength;

    while (end != BreakIterator.DONE) {
      // Look at the end and only accept whitespace breaks
      char endChar = target.charAt(end - 1);
      while (!Character.isWhitespace(endChar)) {
        int lastEnd = end;
        end = boundary.next();
        if (end == BreakIterator.DONE) {
          // give up. We are at the end of the string
          end = lastEnd;
          break;
        }
        endChar = target.charAt(end - 1);
      }
      int wordEnd = end;
      if (endChar == '\n') {
        // trim off the \n since println will do it for us
        wordEnd--;
      } else if (endChar == '\t') {
        // figure tabs use 8 characters
        lineLength += 7;
      }
      String word = target.substring(start, wordEnd);
      if ((lineLength + word.length()) >= maxLength) {
        if (lineLength != 0) {
          writer.println();
          writer.print("  ");
          lineLength = 2;
        }
      }
      lineLength += word.length();
      writer.print(word);
      if (endChar == '\n') {
        // force end of line
        writer.println();
        writer.print("  ");
        lineLength = 2;
      }
      start = end;
      end = boundary.next();
    }
    if (lineLength != 0) {
      writer.println();
    }
  }
Provides single point for all log messages to written to. Currently this class only supports
static methods and always writes to stdout.
geode-core/src/test/java/org/apache/persistence/admin/Logger.java