code: func (t *FileTarget) Open(errWriter io.Writer) error {
  	t.Filter.Init()
  	if t.FileName == "" {
  		return errors.New("FileTarget.FileName must be set")
  	}
  	if t.Rotate {
  		if t.BackupCount < 0 {
  			return errors.New("FileTarget.BackupCount must be no less than 0")
  		}
  		if t.MaxBytes <= 0 {
  			return errors.New("FileTarget.MaxBytes must be no less than 0")
  		}
  	}
  
  	fd, err := os.OpenFile(t.FileName, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0660)
  	if err != nil {
  		return fmt.Errorf("FileTarget was unable to create a log file: %v", err)
  	}
  	t.fd = fd
  	t.errWriter = errWriter
  
  	return nil
  }
docs: // Open prepares FileTarget for processing log messages.