code: public static ThreadFactory newDaemonThreadFactory(Optional<Logger> logger, Optional<String> nameFormat) {
      return newThreadFactory(new ThreadFactoryBuilder().setDaemon(true), logger, nameFormat);
    }
docs: Get a new {@link ThreadFactory} that uses a {@link LoggingUncaughtExceptionHandler}
  to handle uncaught exceptions, uses the given thread name format, and produces daemon threads.
  
  @param logger an {@link Optional} wrapping the {@link Logger} that the
  {@link LoggingUncaughtExceptionHandler} uses to log uncaught exceptions thrown in threads
  @param nameFormat an {@link Optional} wrapping a thread naming format
  @return a new {@link ThreadFactory}