@Override
  public void put(final int messageLevel, final String message, final Throwable throwable) {
    String exceptionText = null;
    if (throwable != null) {
      StringWriter stringWriter = new StringWriter();
      PrintWriter printWriter = new PrintWriter(stringWriter);
      throwable.printStackTrace(printWriter);
      printWriter.close();
      try {
        stringWriter.close();
      } catch (IOException ignore) {
      }
      exceptionText = stringWriter.toString();
    }
    put(messageLevel, new Date(), connectionName, getThreadName(), getThreadId(), message,
        exceptionText);
  }
Logs a message and an exception to the specified log destination.

@param messageLevel a string representation of the level
@param message the actual message to log
@param throwable the actual Exception to log
geode-core/src/main/java/org/apache/geode/internal/logging/PureLogWriter.java