docs: public static void logBeforeExit(ExitLogger logger) {
          try {
              if (logged.compareAndSet(false, true)) {
                  logger.logExit();
              }
          } catch (Throwable ignored){
              // ignored
          }
      }