code: func NewUploader(cfg UploaderConfig) (*Uploader, error) {
  	if err := cfg.CheckAndSetDefaults(); err != nil {
  		return nil, trace.Wrap(err)
  	}
  
  	ctx, cancel := context.WithCancel(cfg.Context)
  	uploader := &Uploader{
  		UploaderConfig: cfg,
  		Entry: log.WithFields(log.Fields{
  			trace.Component: teleport.ComponentAuditLog,
  		}),
  		cancel:    cancel,
  		ctx:       ctx,
  		semaphore: make(chan struct{}, cfg.ConcurrentUploads),
  		scanDir:   filepath.Join(cfg.DataDir, cfg.ServerID, SessionLogsDir, cfg.Namespace),
  	}
  	return uploader, nil
  }
docs: // NewUploader creates new disk based session logger