public synchronized void dumpTo(PrintWriter out) {
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");

    for (LogMessage msg : messages) {
      out.write(df.format(new Date(msg.timestamp)));
      out.write(" ");
      out.println(new String(msg.message, Charsets.UTF_8));
    }
  }
Dump the contents of the buffer to the given stream.
hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MemoryBoundedLogMessageBuffer.java