code: func setupLogging() io.Closer {
  	if *flagSyslog && runtime.GOOS == "windows" {
  		exitf("-syslog not available on windows")
  	}
  	if fn := setupLoggingSyslog; fn != nil {
  		if flusher := fn(); flusher != nil {
  			return flusher
  		}
  	}
  	if env.OnGCE() {
  		lw, err := gce.LogWriter()
  		if err != nil {
  			log.Fatalf("Error setting up logging: %v", err)
  		}
  		log.SetOutput(lw)
  		return lw
  	}
  	return maybeSetupGoogleCloudLogging()
  }
docs: // setupLogging sets up logging and returns an io.Closer that flushes logs.