private void write(StringBuffer buffer, String message) {
    if (message != null) {
      Date date = new Date();
      buffer.append(dateFormat.format(date));
      buffer.append(" - ");
      buffer.append(message);
      buffer.append("\n");
    }
  }
Appends a message to the specified buffer

@param buffer  the StringBuffer to use to append the formatted message
@param message a String containing the message to log
ambari-server/src/main/java/org/apache/ambari/server/serveraction/ActionLog.java