code: func (m *MemLogger) Messages() []LogEntry {
  	if m.lock != nil {
  		m.lock.Lock()
  		defer m.lock.Unlock()
  	}
  	if m.data == nil || len(*m.data) == 0 {
  		return nil
  	}
  	ret := make([]LogEntry, len(*m.data))
  	copy(ret, *m.data)
  	return ret
  }
docs: // Messages returns all of the log messages that this memory logger has
  // recorded.