code: func NewLogWriter(buf int) *LogWriter {
  	return &LogWriter{
  		logs:     make([]string, buf),
  		index:    0,
  		handlers: make(map[LogHandler]struct{}),
  	}
  }
docs: // NewLogWriter creates a LogWriter with the given buffer capacity