code: func (logger *Logger) SetBufferLength(length int) {
  	logger.lock.Lock()
  
  	if length == 0 {
  		logger.buffer = nil
  	} else if length != logger.buffer.Len() {
  		logger.buffer = ring.New(length)
  	}
  
  	logger.lock.Unlock()
  }
docs: // SetBufferLength sets length of buffer for accepting log records.