code: func WaitForAllUnprocessedRecords() {
  	lock.Lock()
  	var wg sync.WaitGroup
  	for _, logger := range loggers {
  		wg.Add(1)
  		go func(logger *Logger) {
  			logger.WaitForUnprocessedRecords()
  			wg.Done()
  		}(logger)
  	}
  	wg.Wait()
  	lock.Unlock()
  }
docs: // WaitForAllUnprocessedRecords blocks execution until all unprocessed
  // log records are processed.
  // Since this library implements async logging, it is possible to have
  // unprocessed logs at the moment when application is terminating.
  // In that case, log messages can be lost. This mehtods blocks execution
  // until all log records are processed, to ensure that all log messages
  // are handled.