code: func (m *MemLogger) Dump(w io.Writer) (n int, err error) {
  	amt := 0
  	for i, msg := range m.Messages() {
  		if i == 0 {
  			amt, err = fmt.Fprintf(w, "\nDUMP LOG:\n")
  			n += amt
  			if err != nil {
  				return
  			}
  		}
  		if msg.Data == nil {
  			amt, err = fmt.Fprintf(w, "  %s: %s\n", msg.Level, msg.Msg)
  			n += amt
  			if err != nil {
  				return
  			}
  		} else {
  			amt, err = fmt.Fprintf(w, "  %s: %s: %s\n", msg.Level, msg.Msg, logging.Fields(msg.Data))
  			n += amt
  			if err != nil {
  				return
  			}
  		}
  	}
  	return
  }
docs: // Dump dumps the current memory logger contents to the given writer in a
  // human-readable format.