protected static void logException(Exception failed) {
    StringWriter sw = new StringWriter();
    PrintWriter pw = new PrintWriter(sw);
    failed.printStackTrace(pw);
    System.out
        .println("BaseServiceTest :: Logging exception details : " + sw.getBuffer().toString());
  }
Print exception string to system.out
geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/junit/BaseServiceTest.java