code: func (cfg *FileLogConfig) CheckAndSetDefaults() error {
  	if cfg.Dir == "" {
  		return trace.BadParameter("missing parameter Dir")
  	}
  	if !utils.IsDir(cfg.Dir) {
  		return trace.BadParameter("path %q does not exist or is not a directory", cfg.Dir)
  	}
  	if cfg.SymlinkDir == "" {
  		cfg.SymlinkDir = cfg.Dir
  	}
  	if !utils.IsDir(cfg.SymlinkDir) {
  		return trace.BadParameter("path %q does not exist or is not a directory", cfg.SymlinkDir)
  	}
  	if cfg.RotationPeriod == 0 {
  		cfg.RotationPeriod = defaults.LogRotationPeriod
  	}
  	if cfg.RotationPeriod%(24*time.Hour) != 0 {
  		return trace.BadParameter("rotation period %v is not a multiple of 24 hours, e.g. '24h' or '48h'", cfg.RotationPeriod)
  	}
  	if cfg.Clock == nil {
  		cfg.Clock = clockwork.NewRealClock()
  	}
  	if cfg.UIDGenerator == nil {
  		cfg.UIDGenerator = utils.NewRealUID()
  	}
  	return nil
  }
docs: // CheckAndSetDefaults checks and sets config defaults